diff options
author | rbuj <[email protected]> | 2022-02-07 13:13:03 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-09 15:28:38 +0200 |
commit | 02ec67a10a4bb7973c545357eb8d0525ae29c9a9 (patch) | |
tree | e34a6a752025536acb635c1b84aef4e1741e4ec1 | |
parent | 029bf69d8a53a5dd26ec9b15d89f02769e2546a2 (diff) | |
download | mate-applets-02ec67a10a4bb7973c545357eb8d0525ae29c9a9.tar.bz2 mate-applets-02ec67a10a4bb7973c545357eb8d0525ae29c9a9.tar.xz |
command: fix memory leak
-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); |