]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix memory leak in safe-cookie authentication code
authorNick Mathewson <nickm@torproject.org>
Sat, 29 Dec 2012 03:38:42 +0000 (22:38 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 29 Dec 2012 03:38:42 +0000 (22:38 -0500)
Coverity spotted this. Bug 7816. Fix on 0.2.3.13-alpha.

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

diff --git a/changes/bug7816_023 b/changes/bug7816_023
new file mode 100644 (file)
index 0000000..cfa754a
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (memory leak, controller):
+    - Fix a memory leak during safe-cookie controller authentication.
+      Spotted by Coverity. Fixes part of bug 7816; bugfix on 0.2.3.13-alpha.
index 913d18a7fc18f58cfcd4251be18c474952697e4d..fc7bae23e13a0509663fb780156e20f1ead1985c 100644 (file)
@@ -3099,6 +3099,8 @@ handle_control_authchallenge(control_connection_t *conn, uint32_t len,
                            "SERVERNONCE=%s\r\n",
                            server_hash_encoded,
                            server_nonce_encoded);
+
+  tor_free(client_nonce);
   return 0;
 }