]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory leak in an error case of SAFECOOKIE authentication.
authorNick Mathewson <nickm@torproject.org>
Fri, 30 Mar 2012 14:20:48 +0000 (10:20 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 30 Mar 2012 14:20:48 +0000 (10:20 -0400)
Found by Coverity Scan; fix for CID 507; bugfix on 0.2.3.13-alpha.

changes/memleak_safecookie [new file with mode: 0644]
src/or/control.c

diff --git a/changes/memleak_safecookie b/changes/memleak_safecookie
new file mode 100644 (file)
index 0000000..9773af5
--- /dev/null
@@ -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.
index 1eb6b80b802a29ca4bfc211f82d16fb874089427..397bb53ab42677d62cd05f77f7146cfc025334b6 100644 (file)
@@ -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;
     }