diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-21 14:03:06 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-21 15:07:00 +0200 |
commit | 90cb3743be293aab801a78196ad038c039786c19 (patch) | |
tree | 8bfee8afc127c540b0466b47553dc2a597dcd38e /ext/openssl | |
parent | fea9f93166a31760679101269aee2326ee8185e9 (diff) | |
download | php-git-90cb3743be293aab801a78196ad038c039786c19.tar.gz |
Free cert in php_openssl_load_stream_cafile()
X509_STORE_add_cert() increments the refcount of the cert, so we
should free it here.
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/xp_ssl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index a423da6e74..c8e5692bbe 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -827,6 +827,7 @@ static long php_openssl_load_stream_cafile(X509_STORE *cert_store, const char *c buffer_active = 0; if (cert && X509_STORE_add_cert(cert_store, cert)) { ++certs_added; + X509_free(cert); } goto cert_start; } |