From 56ddda54b5aa01474bf563d5a662075c35152858 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 27 Jun 2018 17:37:11 -0500 Subject: supervise-daemon.c: clean up memory leaks --- src/rc/supervise-daemon.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/rc') 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 -- cgit v1.2.3