]> granicus.if.org Git - mutt/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)
committerMatthias Andree <matthias.andree@gmx.de>
Sun, 12 Feb 2017 17:59:48 +0000 (09:59 -0800)
commitfb869a5f8a5d30e471024915cb675ee68ebe9c02
tree23521fcbddc39638cd17f0c5a1d3ff52f5a1a116
parent4500b8d19edcfd9104d4740560dce31f36e07f36
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