leak-detective: Resolve hooked functions during initialization
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Jun 2013 13:38:56 +0000 (15:38 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 11 Jun 2013 13:48:26 +0000 (15:48 +0200)
commitf5f7053bcdb5b25b412a87f5853b4a6d94b8abe8
tree93600e3518576ecdae21d75bf223ec29336ca353
parent3873526f3e83f537562859ef1d9326596eaf6609
leak-detective: Resolve hooked functions during initialization

If uses of dlopen(), e.g. when loading plugins, produce errors an error
string could get allocated dynamically.  At this point realloc() might not
yet be resolved and when dlsym() is later called by leak detective to do
so the error string might get freed while leak detective is disabled and
real_free() will be called with a pointer into one of leak detective's
memory blocks instead of a pointer to the block itself, causing a SIGSEGV.
src/libstrongswan/utils/leak_detective.c