diff options
author | rbuj <[email protected]> | 2022-02-07 13:13:03 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-03-23 04:24:51 +0000 |
commit | 702b057b5b761b4ab8d15648978249b64cbfd3d0 (patch) | |
tree | c571ca9abfe0b4b4d5d278c2dd1d0c538874869c /command/src/command.c | |
parent | b38c8b7603bc1db9d368d1510d74f42942c154d6 (diff) | |
download | mate-applets-702b057b5b761b4ab8d15648978249b64cbfd3d0.tar.bz2 mate-applets-702b057b5b761b4ab8d15648978249b64cbfd3d0.tar.xz |
command: fix memory leak
Diffstat (limited to 'command/src/command.c')
-rw-r--r-- | command/src/command.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/command/src/command.c b/command/src/command.c index 120aa9c8..ac756eb2 100644 --- a/command/src/command.c +++ b/command/src/command.c @@ -225,12 +225,16 @@ settings_command_changed (GSettings *settings, gchar *key, CommandApplet *comman cmdline = g_settings_get_string (command_applet->settings, COMMAND_KEY); if (strlen (cmdline) == 0 || g_strcmp0(command_applet->cmdline, cmdline) == 0) + { + g_free (cmdline); return; + } if (!g_shell_parse_argv (cmdline, NULL, &argv, &error)) { gtk_label_set_text (command_applet->label, ERROR_OUTPUT); g_clear_error (&error); + g_free (cmdline); return; } g_strfreev(argv); |