From 7271449a0cab6aab8df23736e862e838d03df86e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 17 Mar 2010 20:37:47 +0000 Subject: Fix two leaks. --- src/rc/rc-update.c | 5 ++++- src/rc/runscript.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c index 46adc635..5517c69a 100644 --- a/src/rc/rc-update.c +++ b/src/rc/rc-update.c @@ -219,6 +219,7 @@ static const char * const longopts_help[] = { int rc_update(int argc, char **argv) { + RC_DEPTREE *deptree; RC_STRINGLIST *runlevels; RC_STRING *runlevel; char *service = NULL; @@ -238,7 +239,9 @@ rc_update(int argc, char **argv) stack = true; break; case 'u': - _rc_deptree_load(-1, &ret); + deptree = _rc_deptree_load(-1, &ret); + if (deptree) + rc_deptree_free(deptree); return ret; case_RC_COMMON_GETOPT; } diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 0b2d71a9..4676bd08 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -739,6 +739,8 @@ svc_start_deps(void) free(tmp); } + rc_stringlist_free(tmplist); + tmplist = NULL; rc_stringlist_free(services); services = NULL; } -- cgit v1.2.3