From: Nick Mathewson Date: Thu, 28 May 2015 17:09:00 +0000 (-0400) Subject: Memory leak in tor_cert_parse. CID gi1301381 X-Git-Tag: tor-0.2.7.2-alpha~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3df6f8591ddefca7ca930c3c83f416ac476c4f2b;p=thirdparty%2Ftor.git Memory leak in tor_cert_parse. CID gi1301381 --- diff --git a/src/or/torcert.c b/src/or/torcert.c index e2ddffd7a9..095cbb81f6 100644 --- a/src/or/torcert.c +++ b/src/or/torcert.c @@ -145,10 +145,12 @@ tor_cert_parse(const uint8_t *encoded, const size_t len) } } - return cert; + goto done; err: - ed25519_cert_free(parsed); tor_cert_free(cert); + cert = NULL; + done: + ed25519_cert_free(parsed); return NULL; }