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 <sam@gentoo.org>
This commit is contained in:
parent
fbefd68b2d
commit
c4f8b1559c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user