mirror of
https://github.com/OpenRC/openrc.git
synced 2024-11-27 20:03:29 +08:00
Fix two leaks.
This commit is contained in:
parent
4b333eaf36
commit
7271449a0c
@ -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;
|
||||
}
|
||||
|
@ -739,6 +739,8 @@ svc_start_deps(void)
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
rc_stringlist_free(tmplist);
|
||||
tmplist = NULL;
|
||||
rc_stringlist_free(services);
|
||||
services = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user