diff options
author | Roy Marples <roy@marples.name> | 2010-03-17 20:37:47 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2010-03-17 20:37:47 +0000 |
commit | 7271449a0cab6aab8df23736e862e838d03df86e (patch) | |
tree | 9ab53fdbbc0ea4444b7367e5c430247f9c54d6dd /src | |
parent | 4b333eaf366b6168fbe3e0e2cbf05022499c79aa (diff) |
Fix two leaks.
Diffstat (limited to 'src')
-rw-r--r-- | src/rc/rc-update.c | 5 | ||||
-rw-r--r-- | src/rc/runscript.c | 2 |
2 files changed, 6 insertions, 1 deletions
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; } |