librc: fix mismatched allocs

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2022-03-29 08:00:26 +01:00 committed by William Hubbs
parent 14835a2262
commit fbefd68b2d
2 changed files with 2 additions and 2 deletions

View File

@ -413,7 +413,7 @@ rc_conf_value(const char *setting)
if (exists(RC_CONF_OLD)) {
old = rc_config_load(RC_CONF_OLD);
TAILQ_CONCAT(rc_conf, old, entries);
free(old);
rc_stringlist_free(old);
}
rc_conf = rc_config_directory(rc_conf);

View File

@ -977,7 +977,7 @@ rc_services_in_runlevel_stacked(const char *runlevel)
TAILQ_FOREACH(stack, stacks, entries) {
sl = rc_services_in_runlevel(stack->value);
TAILQ_CONCAT(list, sl, entries);
free(sl);
rc_stringlist_free(sl);
}
rc_stringlist_free(stacks);
return list;