diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-26 00:48:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-09-26 00:48:45 +0000 |
commit | 46863a45c58bc315bc67f33bcfded09c136a68ef (patch) | |
tree | 8a749041b84a775209334154c8d1b6689fdfc745 /bin/ls/print.c | |
parent | b4edc88607de3089b94e03065b7ddd0be677ea3c (diff) |
free(NULL) is valid
Diffstat (limited to 'bin/ls/print.c')
-rw-r--r-- | bin/ls/print.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 380668e6961..4f548df3acf 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.21 2003/09/24 20:36:36 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.22 2003/09/26 00:48:44 deraadt Exp $ */ /* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */ /* @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.21 2003/09/24 20:36:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.22 2003/09/26 00:48:44 deraadt Exp $"; #endif #endif /* not lint */ @@ -179,8 +179,7 @@ printcol(DISPLAY *dp) if ((a = realloc(array, dp->entries * sizeof(FTSENT *))) == NULL) { - if (array) - free(array); + free(array); array = NULL; dp->entries = 0; lastentries = -1; |