Fix two leaks.

This commit is contained in:
Roy Marples 2010-03-17 20:37:47 +00:00
parent 4b333eaf36
commit 7271449a0c
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -739,6 +739,8 @@ svc_start_deps(void)
free(tmp);
}
rc_stringlist_free(tmplist);
tmplist = NULL;
rc_stringlist_free(services);
services = NULL;
}