summaryrefslogtreecommitdiffstats
path: root/bin/ls/print.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-09-26 00:48:44 +0000
committerderaadt <deraadt@openbsd.org>2003-09-26 00:48:44 +0000
commitc62495683335b1f8acb89372a49fa2e8179f01b6 (patch)
treec65979556286f48688167e8e85b226aafe7021b5 /bin/ls/print.c
parentmissed a file (diff)
downloadwireguard-openbsd-c62495683335b1f8acb89372a49fa2e8179f01b6.tar.xz
wireguard-openbsd-c62495683335b1f8acb89372a49fa2e8179f01b6.zip
free(NULL) is valid
Diffstat (limited to 'bin/ls/print.c')
-rw-r--r--bin/ls/print.c7
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;