projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e8dab9
)
exec: free up memory on shutdown
author
Yousong Zhou
<zhouyousong@yunionyun.com>
Mon, 14 Oct 2019 06:48:56 +0000
(06:48 +0000)
committer
Yousong Zhou
<zhouyousong@yunionyun.com>
Tue, 15 Oct 2019 07:51:56 +0000
(07:51 +0000)
src/exec.c
patch
|
blob
|
history
diff --git
a/src/exec.c
b/src/exec.c
index
9574f2c
..
a0e534c
100644
(file)
--- a/
src/exec.c
+++ b/
src/exec.c
@@
-919,6
+919,11
@@
static int exec_shutdown(void) /* {{{ */
INFO("exec plugin: Sent SIGTERM to %hu", (unsigned short int)pl->pid);
}
+ for (int i = 0; pl->argv[i] != NULL; i++) {
+ sfree(pl->argv[i]);
+ }
+ sfree(pl->argv);
+ sfree(pl->exec);
sfree(pl->user);
sfree(pl);