diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 05de90a5..d5f63846 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6059,13 +6059,14 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args) return TRUE; } - char *plugin_name = basename(filename); + gchar *plugin_name = g_path_get_basename(filename); gboolean result = plugins_install(plugin_name, filename); if (result) { - cons_show("Plugin installed, use '/plugin load %s' to enable the plugin.", plugin_name); + cons_show("Plugin installed: %s", plugin_name); } else { cons_show("Failed to install plugin: %s", plugin_name); } + g_free(plugin_name); return TRUE; } else if (g_strcmp0(args[0], "load") == 0) { diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index b4a6467b..7ba0565d 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -87,8 +87,8 @@ caps_init(void) g_key_file_load_from_file(cache, cache_loc, G_KEY_FILE_KEEP_COMMENTS, NULL); - jid_to_ver = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); - jid_to_caps = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)caps_destroy); + jid_to_ver = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); + jid_to_caps = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)caps_destroy); my_sha1 = NULL; }