X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=ssl_common.c;h=4cf72913b27839f48fcb5c4dee5d56153d80d57c;hb=94c8b5dfb65b18ef408c81527bd71fb63e04437d;hp=e46747ec59a05c0510a71f2922aa1aaa1c627500;hpb=242f06f513b5a1f034b15f466eb242db546424b3;p=privoxy.git diff --git a/ssl_common.c b/ssl_common.c index e46747ec..4cf72913 100644 --- a/ssl_common.c +++ b/ssl_common.c @@ -290,8 +290,8 @@ extern void free_certificate_chain(struct client_state *csp) /* Cleaning buffers */ memset(csp->server_certs_chain.info_buf, 0, sizeof(csp->server_certs_chain.info_buf)); - memset(csp->server_certs_chain.file_buf, 0, - sizeof(csp->server_certs_chain.file_buf)); + freez(csp->server_certs_chain.file_buf); + csp->server_certs_chain.next = NULL; /* Freeing memory in whole linked list */ @@ -299,6 +299,11 @@ extern void free_certificate_chain(struct client_state *csp) { struct certs_chain *cert_for_free = cert; cert = cert->next; + + /* Cleaning buffers */ + memset(cert_for_free->info_buf, 0, sizeof(cert_for_free->info_buf)); + freez(cert_for_free->file_buf); + freez(cert_for_free); } } @@ -337,7 +342,7 @@ extern void ssl_send_certificate_error(struct client_state *csp) "
Privoxy was unable " "to securely connect to the destination server.
" "Reason: "; - const char message_end[] = "