rc-update: fix mismatched alloc

Found by GCC 11's -fanalyzer.

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2022-03-31 07:07:56 +01:00 committed by William Hubbs
parent 17496f3c2b
commit d0a2e30137

View File

@ -288,7 +288,7 @@ int main(int argc, char **argv)
if (service)
rc_stringlist_add(runlevels, service);
if (!TAILQ_FIRST(runlevels)) {
free(runlevels);
rc_stringlist_free(runlevels);
runlevels = rc_runlevel_list();
}