Mercurial > pidgin.yaz
diff libpurple/plugin.c @ 28044:c1314a6cefcf
Automatically detect if running under valgrind and don't close plugin
modules so that valgrind can resolve symbols and report where the leaks are
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 28 Jul 2009 01:23:39 +0000 |
parents | 386265b369c9 |
children | b29fed3c8834 |
line wrap: on
line diff
--- a/libpurple/plugin.c Tue Jul 28 01:18:46 2009 +0000 +++ b/libpurple/plugin.c Tue Jul 28 01:23:39 2009 +0000 @@ -33,6 +33,7 @@ #include "request.h" #include "signals.h" #include "util.h" +#include "valgrind.h" #include "version.h" typedef struct @@ -875,7 +876,7 @@ * it keeps all the plugins open, meaning that valgrind is able to * resolve symbol names in leak traces from plugins. */ - if (!g_getenv("PURPLE_LEAKCHECK_HELP")) + if (!g_getenv("PURPLE_LEAKCHECK_HELP") && !RUNNING_ON_VALGRIND) { if (plugin->handle != NULL) g_module_close(plugin->handle);