From: <the...@us...> - 2006-07-18 06:33:40
|
Revision: 16515 Author: thekingant Date: 2006-07-17 23:33:36 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16515&view=rev Log Message: ----------- Fix a tiny and rare memleak when unloading a plugin that was designed for an older version of Gaim. Modified Paths: -------------- trunk/plugins/dbus-example.c trunk/src/plugin.c trunk/src/protocols/msn/user.c Modified: trunk/plugins/dbus-example.c =================================================================== --- trunk/plugins/dbus-example.c 2006-07-17 23:57:12 UTC (rev 16514) +++ trunk/plugins/dbus-example.c 2006-07-18 06:33:36 UTC (rev 16515) @@ -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: trunk/src/plugin.c =================================================================== --- trunk/src/plugin.c 2006-07-17 23:57:12 UTC (rev 16514) +++ trunk/src/plugin.c 2006-07-18 06:33:36 UTC (rev 16515) @@ -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: trunk/src/protocols/msn/user.c =================================================================== --- trunk/src/protocols/msn/user.c 2006-07-17 23:57:12 UTC (rev 16514) +++ trunk/src/protocols/msn/user.c 2006-07-18 06:33:36 UTC (rev 16515) @@ -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. |