diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-08-05 19:07:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-08-05 19:07:33 -0400 |
commit | 413574ad388d1f5bb756e818beb5ea9837b03bc3 (patch) | |
tree | 5ad6bae13207f89d3c94395756b151f4d48b6450 /src/or/circuitlist.c | |
parent | e511a3a4dd4cacd8d2cd4f076ea321f75e5dfd22 (diff) | |
download | tor-413574ad388d1f5bb756e818beb5ea9837b03bc3.tar.gz tor-413574ad388d1f5bb756e818beb5ea9837b03bc3.zip |
Clear socks auth fields before free
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 48c5afc7d0..2222a25af0 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -552,8 +552,14 @@ circuit_free(circuit_t *circ) rend_data_free(ocirc->rend_data); tor_free(ocirc->dest_address); - tor_free(ocirc->socks_username); - tor_free(ocirc->socks_password); + if (ocirc->socks_username) { + memset(ocirc->socks_username, 0x12, ocirc->socks_username_len); + tor_free(ocirc->socks_username); + } + if (ocirc->socks_password) { + memset(ocirc->socks_password, 0x06, ocirc->socks_password_len); + tor_free(ocirc->socks_password); + } } else { or_circuit_t *ocirc = TO_OR_CIRCUIT(circ); /* Remember cell statistics for this circuit before deallocating. */ |