aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-09-09 14:58:15 -0400
committerNick Mathewson <nickm@torproject.org>2013-09-09 14:58:15 -0400
commit42e6ab0e14bc3f6c71e262b4c9d888f67beb599f (patch)
tree69dbc74c718f580f416194bee1ea205d76c782eb /src
parent00fd0cc5f91ad431c4beb25b8cc8f89ff1462268 (diff)
downloadtor-42e6ab0e14bc3f6c71e262b4c9d888f67beb599f.tar
tor-42e6ab0e14bc3f6c71e262b4c9d888f67beb599f.tar.gz
Remove a usage of free()
Diffstat (limited to 'src')
-rw-r--r--src/common/sandbox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 2f5859e77..6fdddd2f2 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -830,7 +830,10 @@ prot_strings(sandbox_cfg_t* cfg)
memcpy(pr_mem_next, param_val, param_size);
// re-point el parameter to protected
- free((char*)((smp_param_t*)el->param)->value);
+ {
+ void *old_val = ((smp_param_t*)el->param)->value;
+ tor_free(old_val);
+ }
((smp_param_t*)el->param)->value = (intptr_t) pr_mem_next;
((smp_param_t*)el->param)->prot = 1;