diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-05-05 11:08:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-05 11:08:05 -0400 |
commit | f61088ce2321be7c408b4298258a268a0a546e78 (patch) | |
tree | 44ca43147a06222429fe3a5eadd1a81ace082e17 /src/or/control.c | |
parent | 72c4a4eb03d6d1be1de2701b4c2c2703bfbca699 (diff) | |
download | tor-f61088ce2321be7c408b4298258a268a0a546e78.tar.gz tor-f61088ce2321be7c408b4298258a268a0a546e78.zip |
Fix a few more memory leaks; not in any released Tor
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c index ebe385923a..780dea58e0 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3779,12 +3779,17 @@ add_onion_helper_keyarg(const char *arg, int discard_pk, memwipe(cp, 0, strlen(cp)); tor_free(cp); }); + smartlist_free(key_args); if (!ok) { crypto_pk_free(pk); pk = NULL; } - if (err_msg_out) *err_msg_out = err_msg; + if (err_msg_out) { + *err_msg_out = err_msg; + } else { + tor_free(err_msg); + } *key_new_alg_out = key_new_alg; *key_new_blob_out = key_new_blob; |