# HG changeset patch # User Mark Doliner # Date 1153204416 0 # Node ID b43aec5fa9eb778ed5738f29050929c9be403c2a # Parent b0e37dcb398738ca762649f209050093a913c251 [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 diff -r b0e37dcb3987 -r b43aec5fa9eb plugins/dbus-example.c --- a/plugins/dbus-example.c Mon Jul 17 23:57:12 2006 +0000 +++ b/plugins/dbus-example.c Tue Jul 18 06:33:36 2006 +0000 @@ -152,7 +152,7 @@ GAIM_PRIORITY_DEFAULT, /**< priority */ "dbus-example", /**< id */ - N_("DBus"), /**< name */ + N_("DBus Example"), /**< name */ VERSION, /**< version */ /** summary */ N_("DBus Plugin Example"), diff -r b0e37dcb3987 -r b43aec5fa9eb src/plugin.c --- 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; } diff -r b0e37dcb3987 -r b43aec5fa9eb src/protocols/msn/user.c --- a/src/protocols/msn/user.c Mon Jul 17 23:57:12 2006 +0000 +++ b/src/protocols/msn/user.c Tue Jul 18 06:33:36 2006 +0000 @@ -55,6 +55,12 @@ { g_return_if_fail(user != NULL); + /* + * TODO: If any GaimBuddy->proto_data pointers point to this + * MsnUser then set them to NULL. Or possibly even better, + * don't set GaimBuddy->proto_data in the first place. + */ + if (user->clientcaps != NULL) g_hash_table_destroy(user->clientcaps);