diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-05-28 12:46:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-28 12:46:06 -0400 |
commit | 24a2bb08abb08e03de8ff962167179cdb4659ed2 (patch) | |
tree | b8ef5ba98b17a59b669eaffc5793de912a127e0e /src/or/routerkeys.c | |
parent | e045c3e1e8a4b455ca4e6ee4429a0b5b02382f75 (diff) | |
download | tor-24a2bb08abb08e03de8ff962167179cdb4659ed2.tar.gz tor-24a2bb08abb08e03de8ff962167179cdb4659ed2.zip |
Fix null dereference on key setup error.
CID 1301369
Diffstat (limited to 'src/or/routerkeys.c')
-rw-r--r-- | src/or/routerkeys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c index 7b7a6d02e4..59169cded7 100644 --- a/src/or/routerkeys.c +++ b/src/or/routerkeys.c @@ -199,7 +199,8 @@ ed_key_init_from_file(const char *fname, uint32_t flags, goto cleanup; err: - memwipe(keypair, 0, sizeof(*keypair)); + if (keypair) + memwipe(keypair, 0, sizeof(*keypair)); tor_free(keypair); tor_cert_free(cert); if (cert_out) |