[tor-commits] [tor/master] Memory leak in tor_cert_parse. CID gi1301381
nickm at torproject.org
nickm at torproject.org
Thu May 28 17:09:32 UTC 2015
commit 3df6f8591ddefca7ca930c3c83f416ac476c4f2b
Author: Nick Mathewson <nickm at torproject.org>
Date: Thu May 28 13:09:00 2015 -0400
Memory leak in tor_cert_parse. CID gi1301381
---
src/or/torcert.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/or/torcert.c b/src/or/torcert.c
index e2ddffd..095cbb8 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;
}
More information about the tor-commits
mailing list