diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-06-03 13:21:39 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-06-03 13:21:39 +0200 |
commit | 140ac99c0c9ff2e505d436ffe6733f9fca53f5ce (patch) | |
tree | 3ace6f93c41ef7799506cf9c407441519ad66512 | |
parent | b7d5b964a2e7d94d7019463358e2b53338feaa4b (diff) | |
download | profani-tty-140ac99c0c9ff2e505d436ffe6733f9fca53f5ce.tar.gz |
Fix memleak again
Memleak was reinroduced in d92c576aa53505d712715b1acc6344af3262c84f It was already fixed in ac5ce105ac08f022d88d7e73dc38f2706d4c44cf But the rebase peetahs rebase ontop of master took the wrong changes. I decided to pull anyways and fix since reviewing/giving feedback without GH probably takes longer.
-rw-r--r-- | src/command/cmd_funcs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 59702fe3..7329046a 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8921,10 +8921,14 @@ cmd_urlopen(ProfWin *window, const char *const command, gchar **args) return TRUE; } - gchar *argv[] = {prefs_get_string(PREF_URL_OPEN_CMD), args[0], NULL}; + gchar* cmd = prefs_get_string(PREF_URL_OPEN_CMD); + gchar *argv[] = {cmd, args[0], NULL}; + if (!call_external(argv, NULL, NULL)) { cons_show_error("Unable to open url: check the logs for more information."); } + + g_free(cmd); } else { cons_show("urlopen not supported in this window"); } |