[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Memory leak in tor_cert_parse. CID gi1301381
commit 3df6f8591ddefca7ca930c3c83f416ac476c4f2b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits