From: Todd C. Miller Date: Tue, 18 Mar 2008 19:57:40 +0000 (+0000) Subject: Don't try to cleanup nsswitch if it has not been initialized. X-Git-Tag: SUDO_1_7_0~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b46531e484bf59b0c2607f5e7d73ec6e258027d;p=sudo Don't try to cleanup nsswitch if it has not been initialized. --- diff --git a/sudo.c b/sudo.c index 4040a13ae..5a90eb2ba 100644 --- a/sudo.c +++ b/sudo.c @@ -1386,8 +1386,10 @@ cleanup(gotsignal) struct sudo_nss *nss; if (!gotsignal) { - tq_foreach_fwd(snl, nss) - nss->close(nss); + if (snl != NULL) { + tq_foreach_fwd(snl, nss) + nss->close(nss); + } sudo_endpwent(); sudo_endgrent(); }