Fix two leaks.
This commit is contained in:
parent
4b333eaf36
commit
7271449a0c
@ -219,6 +219,7 @@ static const char * const longopts_help[] = {
|
|||||||
int
|
int
|
||||||
rc_update(int argc, char **argv)
|
rc_update(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
RC_DEPTREE *deptree;
|
||||||
RC_STRINGLIST *runlevels;
|
RC_STRINGLIST *runlevels;
|
||||||
RC_STRING *runlevel;
|
RC_STRING *runlevel;
|
||||||
char *service = NULL;
|
char *service = NULL;
|
||||||
@ -238,7 +239,9 @@ rc_update(int argc, char **argv)
|
|||||||
stack = true;
|
stack = true;
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
_rc_deptree_load(-1, &ret);
|
deptree = _rc_deptree_load(-1, &ret);
|
||||||
|
if (deptree)
|
||||||
|
rc_deptree_free(deptree);
|
||||||
return ret;
|
return ret;
|
||||||
case_RC_COMMON_GETOPT;
|
case_RC_COMMON_GETOPT;
|
||||||
}
|
}
|
||||||
|
@ -739,6 +739,8 @@ svc_start_deps(void)
|
|||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rc_stringlist_free(tmplist);
|
||||||
|
tmplist = NULL;
|
||||||
rc_stringlist_free(services);
|
rc_stringlist_free(services);
|
||||||
services = NULL;
|
services = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user