1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fix memleak again

Memleak was reinroduced in d92c576aa5
It was already fixed in ac5ce105ac

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.
This commit is contained in:
Michael Vetter 2020-06-03 13:21:39 +02:00
parent b7d5b964a2
commit 140ac99c0c

View File

@ -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");
}