about summary refs log tree commit diff stats
path: root/src/plugins/plugins.c
diff options
context:
space:
mode:
authorPhilip Flohr <philip.flohr@student.kit.edu>2018-08-02 07:51:13 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2018-09-06 19:54:29 +0300
commit054267d738af1799ed47704d24626b2dab4f962f (patch)
tree7c2f858d85b1cd24854423151e6d615ac238a366 /src/plugins/plugins.c
parenta5a7db9e2b63c5748dea312d23aafbb89d660667 (diff)
downloadprofani-tty-054267d738af1799ed47704d24626b2dab4f962f.tar.gz
Fix extended plugin handling PR
Fixes problems found in PR #999
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