[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix a memory leak in handling errors on CERTS cells. bug 7422



commit 713736a6a738aa371176241e11e2f7e06f63523b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Nov 8 23:01:39 2012 -0500

    Fix a memory leak in handling errors on CERTS cells. bug 7422
---
 changes/bug7422     |    3 +++
 src/or/channeltls.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/changes/bug7422 b/changes/bug7422
new file mode 100644
index 0000000..652f1a2
--- /dev/null
+++ b/changes/bug7422
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Fix a memory leak on failing cases of channel_tls_process_certs_cell.
+      Fixes bug 7422; bugfix on 0.2.4.4-alpha.
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index d094d15..ede2458 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -1522,7 +1522,7 @@ channel_tls_process_certs_cell(var_cell_t *cell, channel_tls_t *chan)
            safe_str(chan->conn->base_.address),                 \
            chan->conn->base_.port, (s));                        \
     connection_or_close_for_error(chan->conn, 0);               \
-    return;                                                     \
+    goto err;                                                   \
   } while (0)
 
   if (chan->conn->base_.state != OR_CONN_STATE_OR_HANDSHAKING_V3)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits