[tor-commits] [tor/master] Fix a double-free in failing case of handle_control_authenticate.

nickm at torproject.org nickm at torproject.org
Thu Sep 18 15:15:26 UTC 2014


commit 58e813d0fcfcecfc2017255f2d8943cd26a4b2e7
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Sep 18 11:13:57 2014 -0400

    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.
---
 src/or/control.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/or/control.c b/src/or/control.c
index 60aa869..7038b2c 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1177,6 +1177,7 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len,
       });
       SMARTLIST_FOREACH(sl, char *, cp, tor_free(cp));
       smartlist_free(sl);
+      sl = NULL;
 
       if (used_quoted_string)
         errstr = "Password did not match HashedControlPassword value from "



More information about the tor-commits mailing list