about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-07-22 15:12:02 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-07-22 15:26:32 +0200
commit41b54a5c143a6ff6b0b6cdec5b7a10af831c16d2 (patch)
tree2f2596fb1b364a36e0d967adf7dd8592d2a76f14 /src/command/cmd_funcs.c
parent27952cb16c142e89d18044d4e9986d5dc989d241 (diff)
downloadprofani-tty-41b54a5c143a6ff6b0b6cdec5b7a10af831c16d2.tar.gz
Fix 3 leaks in cmd_funcs
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 0099ab67..b2893633 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -420,6 +420,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
             } else {
                 cons_show("Error evaluating password, see logs for details.");
                 account_free(account);
+                free(user);
                 return TRUE;
             }
 
@@ -6776,11 +6777,13 @@ cmd_plugins_sourcepath(ProfWin *window, const char *const command, gchar **args)
 
         if (!is_dir(path)) {
             cons_show("Plugins sourcepath must be a directory.");
+            free(path);
             return TRUE;
         }
 
         cons_show("Setting plugins sourcepath: %s", path);
         prefs_set_string(PREF_PLUGINS_SOURCEPATH, path);
+        free(path);
         return TRUE;
     }
 
@@ -6865,6 +6868,7 @@ cmd_plugins_install(ProfWin *window, const char *const command, gchar **args)
         return TRUE;
     }
 
+    free(path);
     cons_show("Argument must be a file or directory.");
     return TRUE;
 }