diff options
author | rbuj <[email protected]> | 2019-04-28 18:59:01 +0200 |
---|---|---|
committer | Robert Antoni Buj Gelonch <[email protected]> | 2019-05-05 13:50:57 +0200 |
commit | 1c5ee6ada91d944fc6a0600e8f9255e45aa2b8d3 (patch) | |
tree | 6353f1ddf0783f6d45d43ebbbea9d8f044363edd | |
parent | df8106540d1e9affff2879d5d5bc88d84c17a6ca (diff) | |
download | mate-system-monitor-1c5ee6ada91d944fc6a0600e8f9255e45aa2b8d3.tar.bz2 mate-system-monitor-1c5ee6ada91d944fc6a0600e8f9255e45aa2b8d3.tar.xz |
msm_execute_helper: fix memory leak
-rw-r--r-- | tools/msm_execute_helper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/msm_execute_helper.c b/tools/msm_execute_helper.c index eff687a..5d568b4 100644 --- a/tools/msm_execute_helper.c +++ b/tools/msm_execute_helper.c @@ -8,10 +8,12 @@ int main(int argc, char* argv[]) gchar **argv_modified = g_new0 (gchar *, argc + 1); memcpy (argv_modified, argv, argc * sizeof (char*)); argv_modified[0] = COMMAND; + int errsv = 0; if (execvp (COMMAND, argv_modified) == -1) { - return errno; + errsv = errno; } - return 0; + g_free (argv_modified); + return errsv; } |