Mercurial > pidgin
diff src/plugin.c @ 13962:b43aec5fa9eb
[gaim-migrate @ 16515]
Fix a tiny and rare memleak when unloading a plugin that was
designed for an older version of Gaim.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 18 Jul 2006 06:33:36 +0000 |
parents | 3cd388613624 |
children | 8bda65b88e49 |
line wrap: on
line diff
--- a/src/plugin.c Mon Jul 17 23:57:12 2006 +0000 +++ b/src/plugin.c Tue Jul 18 06:33:36 2006 +0000 @@ -772,12 +772,16 @@ * mismatch, but it's a lot better than trying to free something * we shouldn't, and crashing while trying to load an old plugin */ if(plugin->info == NULL || plugin->info->magic != GAIM_PLUGIN_MAGIC || - plugin->info->major_version != GAIM_MAJOR_VERSION) { + plugin->info->major_version != GAIM_MAJOR_VERSION) + { if(plugin->handle) g_module_close(plugin->handle); + g_free(plugin->path); + g_free(plugin->error); + GAIM_DBUS_UNREGISTER_POINTER(plugin); - + g_free(plugin); return; }