mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Remove a usage of free()
This commit is contained in:
parent
00fd0cc5f9
commit
42e6ab0e14
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user