]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: we might not have a root process
authorRoy Marples <roy@marples.name>
Tue, 11 Nov 2025 07:21:09 +0000 (07:21 +0000)
committerRoy Marples <roy@marples.name>
Tue, 11 Nov 2025 07:21:09 +0000 (07:21 +0000)
src/dhcpcd.c

index 474debddc34c3f230cf8eb8de293a149e9fb53de..0bf0dfa494cac457296400a14967064f4475df7d 100644 (file)
@@ -2719,7 +2719,7 @@ exit1:
        if (ctx.options & DHCPCD_STARTED && !(ctx.options & DHCPCD_FORKED))
                loginfox(PACKAGE " exited");
 #ifdef PRIVSEP
-       if (ps_root_stop(&ctx) == -1)
+       if (ctx.ps_root != NULL && ps_root_stop(&ctx) == -1)
                i = EXIT_FAILURE;
        eloop_free(ctx.ps_eloop);
 #endif