]> granicus.if.org Git - php/commitdiff
openssl_pkcs12_read: add missing BIO_free
authorJelle van der Waa <jelle@vdwaa.nl>
Tue, 30 May 2017 13:55:05 +0000 (15:55 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 2 Jun 2017 21:52:43 +0000 (23:52 +0200)
When filling the extracerts array with certificates bio_out is created
but not free'd leading to a small memory leak of 224 bytes (reported by
valgrind).

ext/openssl/openssl.c

index c1aa19679e02ed709baaae280928b3de9ab84e34..77897a2f44427b1bae034f20e5bcbaed6c9b57e0 100644 (file)
@@ -2990,6 +2990,7 @@ PHP_FUNCTION(openssl_pkcs12_read)
                                }
 
                                X509_free(aCA);
+                               BIO_free(bio_out);
                        }
 
                        sk_X509_free(ca);