Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
13961:b0e37dcb3987 | 13962:b43aec5fa9eb |
---|---|
770 | 770 |
771 /* true, this may leak a little memory if there is a major version | 771 /* true, this may leak a little memory if there is a major version |
772 * mismatch, but it's a lot better than trying to free something | 772 * mismatch, but it's a lot better than trying to free something |
773 * we shouldn't, and crashing while trying to load an old plugin */ | 773 * we shouldn't, and crashing while trying to load an old plugin */ |
774 if(plugin->info == NULL || plugin->info->magic != GAIM_PLUGIN_MAGIC || | 774 if(plugin->info == NULL || plugin->info->magic != GAIM_PLUGIN_MAGIC || |
775 plugin->info->major_version != GAIM_MAJOR_VERSION) { | 775 plugin->info->major_version != GAIM_MAJOR_VERSION) |
776 { | |
776 if(plugin->handle) | 777 if(plugin->handle) |
777 g_module_close(plugin->handle); | 778 g_module_close(plugin->handle); |
778 | 779 |
780 g_free(plugin->path); | |
781 g_free(plugin->error); | |
782 | |
779 GAIM_DBUS_UNREGISTER_POINTER(plugin); | 783 GAIM_DBUS_UNREGISTER_POINTER(plugin); |
780 | 784 |
781 g_free(plugin); | 785 g_free(plugin); |
782 return; | 786 return; |
783 } | 787 } |
784 | 788 |
785 if (plugin->info != NULL && plugin->info->dependencies != NULL) | 789 if (plugin->info != NULL && plugin->info->dependencies != NULL) |