httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r930063 - /httpd/httpd/trunk/modules/ssl/ssl_util.c
Date Thu, 01 Apr 2010 18:47:28 GMT
Author: drh
Date: Thu Apr  1 18:47:27 2010
New Revision: 930063

URL: http://svn.apache.org/viewvc?rev=930063&view=rev
Log:
Free surrounding PKCS7 structure to avoid a leak.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_util.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util.c?rev=930063&r1=930062&r2=930063&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util.c Thu Apr  1 18:47:27 2010
@@ -302,10 +302,14 @@ STACK_OF(X509) *ssl_read_pkcs7(server_re
     switch (OBJ_obj2nid(p7->type)) {
     case NID_pkcs7_signed:
         certs = p7->d.sign->cert;
+        p7->d.sign->cert = NULL;
+        PKCS7_free(p7);
         break;
 
     case NID_pkcs7_signedAndEnveloped:
         certs = p7->d.signed_and_enveloped->cert;
+        p7->d.signed_and_enveloped->cert = NULL;
+        PKCS7_free(p7);
         break;
 
     default:



Mime
View raw message