diff options
author | Stu Tomlinson <nosnilmot@pidgin.im> | 2009-07-28 01:23:39 +0000 |
---|---|---|
committer | Stu Tomlinson <nosnilmot@pidgin.im> | 2009-07-28 01:23:39 +0000 |
commit | 8dd42670d9d4abb533ef8f26901e40f484fa8a98 (patch) | |
tree | b78a22898cb174bca87fd8760662cf9406c99bd3 /libpurple/plugin.c | |
parent | f9d2c1e6a3d208f73cd42d567788b90c2992078f (diff) | |
download | pidgin-8dd42670d9d4abb533ef8f26901e40f484fa8a98.tar.gz |
Automatically detect if running under valgrind and don't close plugin
modules so that valgrind can resolve symbols and report where the leaks are
Diffstat (limited to 'libpurple/plugin.c')
-rw-r--r-- | libpurple/plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libpurple/plugin.c b/libpurple/plugin.c index d295cb92a5..da678b3258 100644 --- a/libpurple/plugin.c +++ b/libpurple/plugin.c @@ -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 @@ purple_plugin_destroy(PurplePlugin *plugin) * 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); |