]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Memory leak on error in connection_or_compute_auth_cell_body. CID 1301372
authorNick Mathewson <nickm@torproject.org>
Thu, 28 May 2015 16:51:20 +0000 (12:51 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 May 2015 16:51:20 +0000 (12:51 -0400)
src/or/connection_or.c

index 48128d6335c9bd08bff8262583daec739a52a9b4..a967c93aca20bb11c2ab96f23ab1b0bad3f551e8 100644 (file)
@@ -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);