summaryrefslogtreecommitdiffstats
path: root/bin/csh/csh.c
diff options
context:
space:
mode:
authoranton <anton@openbsd.org>2017-12-16 10:27:21 +0000
committeranton <anton@openbsd.org>2017-12-16 10:27:21 +0000
commitd99a06615257d2b0453541ec619344fb2a5adaf0 (patch)
treed61fd31933302018743c258eaadb675c8bdbe7b6 /bin/csh/csh.c
parentacrtc(4), sxirsb(4) (diff)
downloadwireguard-openbsd-d99a06615257d2b0453541ec619344fb2a5adaf0.tar.xz
wireguard-openbsd-d99a06615257d2b0453541ec619344fb2a5adaf0.zip
Passing NULL to free() is fine; from Michael W. Bombardieri.
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r--bin/csh/csh.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index d737c31ab30..4971cf04303 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.c,v 1.42 2017/12/12 00:18:58 tb Exp $ */
+/* $OpenBSD: csh.c,v 1.43 2017/12/16 10:27:21 anton Exp $ */
/* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */
/*-
@@ -1013,10 +1013,8 @@ process(bool catch)
printprompt();
(void) fflush(cshout);
}
- if (seterr) {
- free(seterr);
- seterr = NULL;
- }
+ free(seterr);
+ seterr = NULL;
/*
* Echo not only on VERBOSE, but also with history expansion. If there