]> granicus.if.org Git - neomutt/commit
Plug memory leak in weed-expired-certs code.
authorMatthias Andree <matthias.andree@gmx.de>
Sun, 12 Feb 2017 17:59:48 +0000 (09:59 -0800)
committerRichard Russon <rich@flatcap.org>
Mon, 20 Feb 2017 16:49:41 +0000 (16:49 +0000)
commit2ea74e4fbf0fc9fefd66152fc210703ca69b6005
tree6ab99ad91ff0253edd6a87c78d105feb846c8515
parent3ba32102957c2f01fe9d896f7dbea15bb4eac4f4
Plug memory leak in weed-expired-certs code.

X509_STORE_add_cert() creates a copy of the certificate we're offering,
so we need to free our copy afterwards.  This isn't documented, but from
observed behaviour in OpenSSL 1.0.2 and its master branch source code.

Change PEM_read_X509() call to reuse cert to avoid free/reallocation
overhead.
mutt_ssl.c