summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r--src/or/buffers.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 5b9e55ebd5..488289c06d 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -1532,8 +1532,14 @@ socks_request_free(socks_request_t *req)
{
if (!req)
return;
- tor_free(req->username);
- tor_free(req->password);
+ if (req->username) {
+ memset(req->username, 0x10, req->usernamelen);
+ tor_free(req->username);
+ }
+ if (req->password) {
+ memset(req->password, 0x04, req->passwordlen);
+ tor_free(req->password);
+ }
memset(req, 0xCC, sizeof(socks_request_t));
tor_free(req);
}