From fbefd68b2d4daabfd3353dc9e6bb7d1d74e9bee9 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 29 Mar 2022 08:00:26 +0100 Subject: librc: fix mismatched allocs Signed-off-by: Sam James --- src/librc/librc-misc.c | 2 +- src/librc/librc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librc') diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c index 6a3f3226..9dfbaec0 100644 --- a/src/librc/librc-misc.c +++ b/src/librc/librc-misc.c @@ -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); diff --git a/src/librc/librc.c b/src/librc/librc.c index 8841394a..92de375a 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -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; -- cgit v1.2.3