[tor-commits] [tor/master] Fix a memory leak in an error case of SAFECOOKIE authentication.

nickm at torproject.org nickm at torproject.org
Fri Mar 30 14:38:35 UTC 2012


commit affbcded5ca03d8e3ccc5debd3c23240e492c62a
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Mar 30 10:20:48 2012 -0400

    Fix a memory leak in an error case of SAFECOOKIE authentication.
    
    Found by Coverity Scan; fix for CID 507; bugfix on 0.2.3.13-alpha.
---
 changes/memleak_safecookie |    4 ++++
 src/or/control.c           |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/changes/memleak_safecookie b/changes/memleak_safecookie
new file mode 100644
index 0000000..9773af5
--- /dev/null
+++ b/changes/memleak_safecookie
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Fix a small memory leak when trying to decode incorrect base16
+      authenticator during SAFECOOKIE authentication. Found by
+      Coverity Scan. Fixes CID 507. Bugfix on 0.2.3.13-alpha.
diff --git a/src/or/control.c b/src/or/control.c
index 1eb6b80..397bb53 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3020,6 +3020,7 @@ handle_control_authchallenge(control_connection_t *conn, uint32_t len,
       connection_write_str_to_buf("513 Invalid base16 client nonce",
                                   conn);
       connection_mark_for_close(TO_CONN(conn));
+      tor_free(client_nonce);
       return -1;
     }
 





More information about the tor-commits mailing list