diff options
author | rbuj <[email protected]> | 2019-04-28 18:59:01 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-09-12 16:17:44 +0200 |
commit | 819b1861ebec1d492029a5e50db2ff79b057c14a (patch) | |
tree | e85e0b28fa9b870b450650e942aaf2ee288be498 /tools/msm_execute_helper.c | |
parent | be2654f07768d47c3ac6436210b7a8a66180b5f2 (diff) | |
download | mate-system-monitor-819b1861ebec1d492029a5e50db2ff79b057c14a.tar.bz2 mate-system-monitor-819b1861ebec1d492029a5e50db2ff79b057c14a.tar.xz |
msm_execute_helper: fix memory leak
Diffstat (limited to 'tools/msm_execute_helper.c')
-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; } |