# HG changeset patch # User Christian Hammond # Date 1056301383 0 # Node ID a3e60ff95b7d2e68294e5d7a64e65264ca5d37a9 # Parent 94ad4d45346aeb083f95d71e0cde473f44c977f1 [gaim-migrate @ 6381] Fixed a rather good-sized memory leak in plugins. Thanks to faceprint for pointing it out. I thought it was memprof being confused, but it turns out that in the gaim_plugin_destroy() function, we return early if a loader plugin for a non-native plugin cannot be found. That is no good. The check was there to prevent the loader plugin's destroy_plugin() from being called, but the proper fix was just to wrap that in an if statement. committer: Tailor Script diff -r 94ad4d45346a -r a3e60ff95b7d src/plugin.c --- a/src/plugin.c Sun Jun 22 16:27:43 2003 +0000 +++ b/src/plugin.c Sun Jun 22 17:03:03 2003 +0000 @@ -459,13 +459,12 @@ loader = find_loader_for_plugin(plugin); - if (loader == NULL) - return; + if (loader != NULL) { + loader_info = GAIM_PLUGIN_LOADER_INFO(loader); - loader_info = GAIM_PLUGIN_LOADER_INFO(loader); - - if (loader_info->destroy != NULL) - loader_info->destroy(plugin); + if (loader_info->destroy != NULL) + loader_info->destroy(plugin); + } } if (plugin->path != NULL) g_free(plugin->path);