summaryrefslogtreecommitdiff
path: root/src/or/torcert.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-28 13:09:00 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 13:09:00 -0400
commit3df6f8591ddefca7ca930c3c83f416ac476c4f2b (patch)
tree2bf003462aad2b7c41b3b076a52046c3a0bdc457 /src/or/torcert.c
parent3262f3c3f621073d7a5708eff5715fff4abb1cf9 (diff)
downloadtor-3df6f8591ddefca7ca930c3c83f416ac476c4f2b.tar.gz
tor-3df6f8591ddefca7ca930c3c83f416ac476c4f2b.zip
Memory leak in tor_cert_parse. CID gi1301381
Diffstat (limited to 'src/or/torcert.c')
-rw-r--r--src/or/torcert.c6
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;
}