summaryrefslogtreecommitdiff
path: root/src/rc/rc-update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/rc-update.c')
-rw-r--r--src/rc/rc-update.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c
index 46adc63..5517c69 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;
}