diff options
author | Sam James <sam@gentoo.org> | 2022-03-31 07:10:27 +0100 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2022-05-08 14:56:26 -0500 |
commit | c4f8b1559ce5b17db331e289fe0fccfcbf41d93a (patch) | |
tree | bf1bebe01f4e9f392a97bfc9047e46f3d0afe554 /src/librc/librc.c | |
parent | fbefd68b2d4daabfd3353dc9e6bb7d1d74e9bee9 (diff) |
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>
Diffstat (limited to 'src/librc/librc.c')
-rw-r--r-- | src/librc/librc.c | 1 |
1 files changed, 0 insertions, 1 deletions
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); |