projects
/
oweals
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ba9105
)
utils: Free args in __fw3_command_pipe()
author
Hauke Mehrtens
<hauke@hauke-m.de>
Wed, 19 Dec 2018 09:40:07 +0000
(10:40 +0100)
committer
Hauke Mehrtens
<hauke@hauke-m.de>
Thu, 20 Dec 2018 15:10:26 +0000
(16:10 +0100)
args was not freed after leaving this function.
Fixes Coverity issue
1412470
Resource leak
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Jo-Philipp Wich <jo@mein.io>
utils.c
patch
|
blob
|
history
diff --git
a/utils.c
b/utils.c
index 4f892a7aa465bae393f7266a9773971d2bb5703c..684b2c32c25eb5d3123151cce472413c6a9daa04 100644
(file)
--- a/
utils.c
+++ b/
utils.c
@@
-252,6
+252,7
@@
__fw3_command_pipe(bool silent, const char *command, ...)
switch ((pid = fork()))
{
case -1:
+ free(args);
return false;
case 0:
@@
-275,6
+276,7
@@
__fw3_command_pipe(bool silent, const char *command, ...)
}
pipe_fd = fdopen(pfds[1], "w");
+ free(args);
return true;
}