aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Egerer <thomas.egerer@secunet.com>2014-02-10 17:14:24 +0100
committerMartin Willi <martin@revosec.ch>2014-02-10 17:23:54 +0100
commitb351acfed67b87f9f3a014a6c90807e08816cca2 (patch)
treed508c668e15fd0fac895697159bbce78e5155bfa /src
parent770735722754f572ed452259d3b25cd40f27d70c (diff)
downloadstrongswan-b351acfed67b87f9f3a014a6c90807e08816cca2.tar.bz2
strongswan-b351acfed67b87f9f3a014a6c90807e08816cca2.tar.xz
leak_detective: Assign return value of realloc to buf
If realloc return a pointer value different from the value to be reallocated, a double free can occur in this context. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils/leak_detective.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c
index 36ed1735c..ff80bbc89 100644
--- a/src/libstrongswan/utils/leak_detective.c
+++ b/src/libstrongswan/utils/leak_detective.c
@@ -483,7 +483,7 @@ static void* real_realloc(void *ptr, size_t size)
static bool register_hooks()
{
void *buf = real_malloc(8);
- real_realloc(buf, 16);
+ buf = real_realloc(buf, 16);
real_free(buf);
return TRUE;
}