summaryrefslogtreecommitdiffstats
path: root/bin/csh/csh.c
diff options
context:
space:
mode:
authormiko <miko@openbsd.org>2018-09-08 01:28:39 +0000
committermiko <miko@openbsd.org>2018-09-08 01:28:39 +0000
commitbcb7da30103e8a316f47fd62062fbdf1c1288c59 (patch)
tree9aa60ebd7ca2ff31e7e70a96dcfb149e8414431e /bin/csh/csh.c
parentDon't cause an error when setting the same rdomain. (diff)
downloadwireguard-openbsd-bcb7da30103e8a316f47fd62062fbdf1c1288c59.tar.xz
wireguard-openbsd-bcb7da30103e8a316f47fd62062fbdf1c1288c59.zip
blkfree() takes no action for NULL pointer so callers can avoid checking.
ok jca@
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r--bin/csh/csh.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index 4971cf04303..0bf879c8b5e 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.c,v 1.43 2017/12/16 10:27:21 anton Exp $ */
+/* $OpenBSD: csh.c,v 1.44 2018/09/08 01:28:39 miko Exp $ */
/* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */
/*-
@@ -885,7 +885,6 @@ pintr(int notused)
void
pintr1(bool wantnl)
{
- Char **v;
sigset_t sigset, osigset;
sigemptyset(&sigset);
@@ -914,10 +913,10 @@ pintr1(bool wantnl)
if (gointr) {
gotolab(gointr);
timflg = 0;
- if ((v = pargv) != NULL)
- pargv = 0, blkfree(v);
- if ((v = gargv) != NULL)
- gargv = 0, blkfree(v);
+ blkfree(pargv);
+ pargv = NULL;
+ blkfree(gargv);
+ gargv = NULL;
reset();
}
else if (intty && wantnl) {