From c4f8b1559ce5b17db331e289fe0fccfcbf41d93a Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 31 Mar 2022 07:10:27 +0100 Subject: librc: fix double-free 'services' is still referenced by the list which gets returned. We can't free it. Thanks to GCC 11's -fanalyzer. Signed-off-by: Sam James --- src/librc/librc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librc/librc.c b/src/librc/librc.c index 92de375a..51e37aba 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -1009,7 +1009,6 @@ rc_services_in_state(RC_SERVICE state) services = ls_dir(dir, LS_INITD); if (services) { TAILQ_CONCAT(list, services, entries); - free(services); } } rc_stringlist_free(dirs); -- cgit v1.2.3