diff options
Diffstat (limited to 'lib/libc/gen/getusershell.c')
-rw-r--r-- | lib/libc/gen/getusershell.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c index 0bcbf0b0464..c835f4ddbe9 100644 --- a/lib/libc/gen/getusershell.c +++ b/lib/libc/gen/getusershell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getusershell.c,v 1.15 2015/02/06 23:21:58 millert Exp $ */ +/* $OpenBSD: getusershell.c,v 1.16 2015/09/14 16:09:13 tedu Exp $ */ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. @@ -67,11 +67,9 @@ void endusershell(void) { - if (shells != NULL) - free(shells); + free(shells); shells = NULL; - if (strings != NULL) - free(strings); + free(strings); strings = NULL; curshell = NULL; } @@ -90,11 +88,9 @@ initshells(void) FILE *fp; struct stat statb; - if (shells != NULL) - free(shells); + free(shells); shells = NULL; - if (strings != NULL) - free(strings); + free(strings); strings = NULL; if ((fp = fopen(_PATH_SHELLS, "re")) == NULL) return (okshells); |