]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a double-free in failing case of handle_control_authenticate.
authorNick Mathewson <nickm@torproject.org>
Thu, 18 Sep 2014 15:13:57 +0000 (11:13 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 26 Sep 2014 12:58:15 +0000 (08:58 -0400)
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 ]

src/or/control.c

index b1709e0d23eecf1cebd5a02bb8010ef6053b29c8..92dd2309ed3a35fd7ef1811b219e8bdb5bcb7ac5 100644 (file)
@@ -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,
       {