Explorar el Código

Set handshake_state to NULL before appending cpath hops

svn:r1505
Nick Mathewson hace 21 años
padre
commit
ef438b894c
Se han modificado 2 ficheros con 6 adiciones y 0 borrados
  1. 3 0
      src/or/rendclient.c
  2. 3 0
      src/or/rendservice.c

+ 3 - 0
src/or/rendclient.c

@@ -204,6 +204,9 @@ rend_client_receive_rendezvous(circuit_t *circ, const char *request, int request
     goto err;
   }
 
+  crypto_dh_free(hop->handshake_state);
+  hop->handshake_state = NULL;
+
   /* All is well. Extend the circuit. */
   circ->purpose = CIRCUIT_PURPOSE_C_REND_JOINED;
   hop->state = CPATH_STATE_OPEN;

+ 3 - 0
src/or/rendservice.c

@@ -588,6 +588,9 @@ rend_service_rendezvous_is_ready(circuit_t *circuit)
     goto err;
   }
 
+  crypto_dh_free(hop->handshake_state);
+  hop->handshake_state = NULL;
+
   /* Append the cpath entry. */
   hop->state = CPATH_STATE_OPEN;
   onion_append_to_cpath(&circuit->cpath, hop);