diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2018-06-27 17:37:11 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2018-06-27 17:37:11 -0500 |
commit | 56ddda54b5aa01474bf563d5a662075c35152858 (patch) | |
tree | 5c6e0bd5db6098caedf0a332a613b76d54a1e836 | |
parent | 3a803b3135837665d51ef4dd7a8b913c78e71ff6 (diff) |
supervise-daemon.c: clean up memory leaks
-rw-r--r-- | src/rc/supervise-daemon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index 60bd1f20..8d56b8d4 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -860,10 +860,13 @@ int main(int argc, char **argv) varbuf = NULL; xasprintf(&varbuf, "%i", respawn_delay); rc_service_value_set(svcname, "respawn_delay", varbuf); + free(varbuf); xasprintf(&varbuf, "%i", respawn_max); rc_service_value_set(svcname, "respawn_max", varbuf); + free(varbuf); xasprintf(&varbuf, "%i", respawn_period); rc_service_value_set(svcname, "respawn_period", varbuf); + free(varbuf); child_pid = fork(); if (child_pid == -1) eerrorx("%s: fork: %s", applet, strerror(errno)); @@ -891,6 +894,7 @@ int main(int argc, char **argv) } xasprintf(&varbuf, "%d", x); rc_service_value_set(svcname, "argc", varbuf); + free(varbuf); rc_service_value_set(svcname, "exec", exec); supervisor(exec, argv); } else |