# HG changeset patch # User Mark Doliner # Date 1174783540 0 # Node ID ab2f466b6a13d8d819f988aab7034c3fd7f48d88 # Parent 9cfe41743c651642c7fa8108af3deb61638e51e5 Get rid of an unnecessary strdup diff -r 9cfe41743c65 -r ab2f466b6a13 libpurple/plugin.c --- a/libpurple/plugin.c Sun Mar 25 00:41:31 2007 +0000 +++ b/libpurple/plugin.c Sun Mar 25 00:45:40 2007 +0000 @@ -369,12 +369,12 @@ return plugin; } - /* - * Check to make sure a plugin has defined an id. - * Not having this check caused purple_plugin_unload to - * enter an infinite loop in certain situations by passing - * purple_find_plugin_by_id a NULL value. -- ecoffey - */ + /* + * Check to make sure a plugin has defined an id. + * Not having this check caused purple_plugin_unload to + * enter an infinite loop in certain situations by passing + * purple_find_plugin_by_id a NULL value. -- ecoffey + */ if (!plugin->info->id || !strcmp(plugin->info->id, "")) { plugin->error = g_strdup_printf(_("This plugin has not defined an ID.")); @@ -672,12 +672,10 @@ { if (!purple_plugin_unload(dep_plugin)) { - char *translated_name = g_strdup(_(dep_plugin->info->name)); char *tmp; tmp = g_strdup_printf(_("The dependent plugin %s failed to unload."), - translated_name); - g_free(translated_name); + _(dep_plugin->info->name)); purple_notify_error(NULL, NULL, _("There were errors unloading the plugin."), tmp);