diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-05-28 13:09:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-28 13:09:00 -0400 |
commit | 3df6f8591ddefca7ca930c3c83f416ac476c4f2b (patch) | |
tree | 2bf003462aad2b7c41b3b076a52046c3a0bdc457 | |
parent | 3262f3c3f621073d7a5708eff5715fff4abb1cf9 (diff) | |
download | tor-3df6f8591ddefca7ca930c3c83f416ac476c4f2b.tar.gz tor-3df6f8591ddefca7ca930c3c83f416ac476c4f2b.zip |
Memory leak in tor_cert_parse. CID gi1301381
-rw-r--r-- | src/or/torcert.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |