From dae24a2f5d3d47b277ed43d20db37dd86fc8c04d Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Tue, 19 May 2015 22:30:45 -0500 Subject: [PATCH] wmgeneral: Free pointer. Fixes "(error) Memory leak: argv" found by cppcheck. --- wmckgmail/wmgeneral/misc.c | 1 + wmcpufreq/wmgeneral/misc.c | 1 + wmifs/wmgeneral/misc.c | 1 + wmitime/wmgeneral/misc.c | 1 + wmkeys/wmgeneral/misc.c | 1 + wmmon/wmgeneral/misc.c | 1 + wmppp.app/wmgeneral/misc.c | 1 + wmsm.app/wmgeneral/misc.c | 1 + wmtime/wmgeneral/misc.c | 1 + wmtz/wmgeneral/misc.c | 1 + 10 files changed, 10 insertions(+) diff --git a/wmckgmail/wmgeneral/misc.c b/wmckgmail/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmckgmail/wmgeneral/misc.c +++ b/wmckgmail/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmcpufreq/wmgeneral/misc.c b/wmcpufreq/wmgeneral/misc.c index ba3885b..3ad6ab3 100644 --- a/wmcpufreq/wmgeneral/misc.c +++ b/wmcpufreq/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmifs/wmgeneral/misc.c b/wmifs/wmgeneral/misc.c index 243f1bc..813db76 100644 --- a/wmifs/wmgeneral/misc.c +++ b/wmifs/wmgeneral/misc.c @@ -162,5 +162,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmitime/wmgeneral/misc.c b/wmitime/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmitime/wmgeneral/misc.c +++ b/wmitime/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmkeys/wmgeneral/misc.c b/wmkeys/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmkeys/wmgeneral/misc.c +++ b/wmkeys/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmmon/wmgeneral/misc.c b/wmmon/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmmon/wmgeneral/misc.c +++ b/wmmon/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmppp.app/wmgeneral/misc.c b/wmppp.app/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmppp.app/wmgeneral/misc.c +++ b/wmppp.app/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmsm.app/wmgeneral/misc.c b/wmsm.app/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmsm.app/wmgeneral/misc.c +++ b/wmsm.app/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmtime/wmgeneral/misc.c b/wmtime/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmtime/wmgeneral/misc.c +++ b/wmtime/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; } diff --git a/wmtz/wmgeneral/misc.c b/wmtz/wmgeneral/misc.c index cdaf7e0..2ba6d06 100644 --- a/wmtz/wmgeneral/misc.c +++ b/wmtz/wmgeneral/misc.c @@ -165,5 +165,6 @@ execCommand(char *command) execvp(argv[0], args); exit(10); } + free(argv); return pid; }