diff options
-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; } |