summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-28 13:14:30 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 13:14:30 -0400
commit49c31877b6dd75c268898849941ae44056bf42df (patch)
treec6341a1a1944a62306c4859f09f2c40a71605c77 /src/or
parent9f289e3b9ed4c60a2c1b1ed18ee18d9b4ce9ece9 (diff)
downloadtor-49c31877b6dd75c268898849941ae44056bf42df.tar.gz
tor-49c31877b6dd75c268898849941ae44056bf42df.zip
Fix a bug in earlier torcert fix, fix another.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/torcert.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/torcert.c b/src/or/torcert.c
index 095cbb81f6..838501ea49 100644
--- a/src/or/torcert.c
+++ b/src/or/torcert.c
@@ -68,13 +68,15 @@ tor_cert_sign_impl(const ed25519_keypair_t *signing_key,
tor_free(encoded);
- return torcert;
+ goto done;
err:
tor_cert_free(torcert);
+ torcert = NULL;
+ done:
ed25519_cert_free(cert);
tor_free(encoded);
- return NULL;
+ return torcert;
}
/**
@@ -151,7 +153,7 @@ tor_cert_parse(const uint8_t *encoded, const size_t len)
cert = NULL;
done:
ed25519_cert_free(parsed);
- return NULL;
+ return cert;
}
/** Fill in <b>checkable_out</b> with the information needed to check