serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1774387 - /serf/branches/ocsp-verification/buckets/ssl_buckets.c
Date Thu, 15 Dec 2016 08:32:47 GMT
Author: brane
Date: Thu Dec 15 08:32:47 2016
New Revision: 1774387

URL: http://svn.apache.org/viewvc?rev=1774387&view=rev
Log:
On the ocsp-verification branch: Use the new certificate cleanup function.

* buckets/ssl_buckets.c
  (serf_ssl_cert_import): Don't leak SSL certificates.

Modified:
    serf/branches/ocsp-verification/buckets/ssl_buckets.c

Modified: serf/branches/ocsp-verification/buckets/ssl_buckets.c
URL: http://svn.apache.org/viewvc/serf/branches/ocsp-verification/buckets/ssl_buckets.c?rev=1774387&r1=1774386&r2=1774387&view=diff
==============================================================================
--- serf/branches/ocsp-verification/buckets/ssl_buckets.c (original)
+++ serf/branches/ocsp-verification/buckets/ssl_buckets.c Thu Dec 15 08:32:47 2016
@@ -2426,9 +2426,12 @@ serf_ssl_certificate_t *serf_ssl_cert_im
         return NULL;
     }
 
-    /* TODO: Setup pool cleanup to free certificate */
     cert = apr_palloc(result_pool, sizeof(serf_ssl_certificate_t));
     cert->ssl_cert = ssl_cert;
+
+    apr_pool_cleanup_register(result_pool, ssl_cert, free_ssl_cert,
+                              apr_pool_cleanup_null);
+
     return cert;
 }
 



Mime
View raw message