summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-18 11:13:57 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-26 08:58:15 -0400
commit801f4d438460cd6eb0190fc18161ad499a95bc9b (patch)
tree9d78b73429362a460d36356f8a85243e6b9f074e /src/or/control.c
parent4e87b97872f8cfb8042091357cbfdc817b7e9b1c (diff)
downloadtor-801f4d438460cd6eb0190fc18161ad499a95bc9b.tar.gz
tor-801f4d438460cd6eb0190fc18161ad499a95bc9b.zip
Fix a double-free in failing case of handle_control_authenticate.
Bugfix on ed8f020e205267e6270494634346ab68d830e1d8; bug not in any released version of Tor. Found by Coverity; this is CID 1239290. [Yes, I used this commit message before, in 58e813d0fcfcecfc2017. Turns out, that fix wasn't right, since I didn't look up a screen. :P ]
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index b1709e0d23..92dd2309ed 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1173,6 +1173,7 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len,
bad_password = 1;
SMARTLIST_FOREACH(sl, char *, cp, tor_free(cp));
smartlist_free(sl);
+ sl = NULL;
} else {
SMARTLIST_FOREACH(sl, char *, expected,
{