diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-12-02 21:54:59 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-12-02 21:54:59 +0000 |
commit | db52077e7d8d67f5fcf7eac6dfc7e5f660027512 (patch) | |
tree | 3860993f1d6de8ec5183b2950b6a50b49890a8d5 /lib/libc/gen/getnetgrent.c | |
parent | 401da39f2a3a91de70625c5c5e11b28affc243e1 (diff) | |
download | FreeBSD-src-db52077e7d8d67f5fcf7eac6dfc7e5f660027512.zip FreeBSD-src-db52077e7d8d67f5fcf7eac6dfc7e5f660027512.tar.gz |
Small tweak: don't try closing /etc/netgroup if we haven't opened it yet.
Diffstat (limited to 'lib/libc/gen/getnetgrent.c')
-rw-r--r-- | lib/libc/gen/getnetgrent.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index 3301b76..2997f63 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -191,7 +191,8 @@ setnetgrent(group) */ if (_use_only_yp && _yp_innetgr) { /* dohw! */ - fclose(netf); + if (netf != NULL) + fclose(netf); return; } #else |