|
From: <the...@us...> - 2006-07-18 06:34:10
|
Revision: 16516 Author: thekingant Date: 2006-07-17 23:34:06 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16516&view=rev Log Message: ----------- Backport SVN revision #16515 from HEAD to v2_0_0 Original commit message: Fix a tiny and rare memleak when unloading a plugin that was designed for an older version of Gaim. ViewCVS Links: ------------- http://svn.sourceforge.net/gaim/?rev=16515&view=rev Modified Paths: -------------- branches/v2_0_0/plugins/dbus-example.c branches/v2_0_0/src/plugin.c branches/v2_0_0/src/protocols/msn/user.c Modified: branches/v2_0_0/plugins/dbus-example.c =================================================================== --- branches/v2_0_0/plugins/dbus-example.c 2006-07-18 06:33:36 UTC (rev 16515) +++ branches/v2_0_0/plugins/dbus-example.c 2006-07-18 06:34:06 UTC (rev 16516) @@ -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"), Modified: branches/v2_0_0/src/plugin.c =================================================================== --- branches/v2_0_0/src/plugin.c 2006-07-18 06:33:36 UTC (rev 16515) +++ branches/v2_0_0/src/plugin.c 2006-07-18 06:34:06 UTC (rev 16516) @@ -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; } Modified: branches/v2_0_0/src/protocols/msn/user.c =================================================================== --- branches/v2_0_0/src/protocols/msn/user.c 2006-07-18 06:33:36 UTC (rev 16515) +++ branches/v2_0_0/src/protocols/msn/user.c 2006-07-18 06:34:06 UTC (rev 16516) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |