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

[tor-commits] [tor/master] Memory leak on error in connection_or_compute_auth_cell_body. CID 1301372



commit 5f15b0e1e25dac6143a0a3f4398d03524ec15c46
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu May 28 12:51:20 2015 -0400

    Memory leak on error in connection_or_compute_auth_cell_body. CID 1301372
---
 src/or/connection_or.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 48128d6..a967c93 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -2356,7 +2356,7 @@ connection_or_compute_authenticate_cell_body(or_connection_t *conn,
     const digests_t *my_digests, *their_digests;
     const uint8_t *my_id, *their_id, *client_id, *server_id;
     if (tor_tls_get_my_certs(server, &link_cert, &id_cert))
-      return -1;
+      goto err;
     my_digests = tor_x509_cert_get_id_digests(id_cert);
     their_digests =
       tor_x509_cert_get_id_digests(conn->handshake_state->id_cert);
@@ -2455,7 +2455,7 @@ connection_or_compute_authenticate_cell_body(or_connection_t *conn,
                                     d, 32);
     if (siglen < 0) {
       log_warn(LD_OR, "Unable to sign AUTH1 data.");
-      return -1;
+      goto err;
     }
 
     auth1_setlen_sig(auth, siglen);



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