leak-detective: Try to properly free allocations after deinitialization
authorTobias Brunner <tobias@strongswan.org>
Mon, 27 Jun 2016 16:04:39 +0000 (18:04 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 29 Jun 2016 09:09:38 +0000 (11:09 +0200)
commit505c318701620531f579d074634b1a4607efd684
treec4e2717c64c04c821ddab03a8de57fd1485171df
parentc1410cb045169c47c59459673219f2e7d878c22c
leak-detective: Try to properly free allocations after deinitialization

If a function we whitelist allocates memory while leak detective is enabled
but only frees it after LD has already been disabled, free() will get called
with invalid pointers (not pointing to the actually allocated memory by LD),
which will cause checks in the C library to fail and the program to crash.
This tries to detect such cases and calling free with the correct pointer.
src/libstrongswan/utils/leak_detective.c