about summary refs log tree commit diff stats
path: root/src/plugins/plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/plugins.c')
-rw-r--r--src/plugins/plugins.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c
index 5b60b398..3e07af4d 100644
--- a/src/plugins/plugins.c
+++ b/src/plugins/plugins.c
@@ -162,6 +162,7 @@ plugins_install_all(const char *const path)
             }
         }
         curr = g_slist_next(curr);
+        g_string_free(error_message, TRUE);
     }
 
     g_slist_free_full(contents, g_free);
@@ -180,7 +181,11 @@ plugins_uninstall(const char *const plugin_name)
     g_string_append(target_path, plugin_name);
     GFile *file = g_file_new_for_path(target_path->str);
     GError *error = NULL;
-    return g_file_delete(file, NULL, &error);
+    gboolean result = g_file_delete(file, NULL, &error);
+    g_object_unref(file);
+    g_error_free(error);
+    g_string_free(target_path, TRUE);
+    return result;
 }
 
 gboolean