summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-04-08 21:52:32 +0300
committerNicholas Clark <nick@ccl4.org>2006-04-10 11:56:21 +0000
commit5ee74a8413ea165905e4d6df1d5c311295897dfc (patch)
tree6c66638c831ba58a4b6b0e26fdab9e0533f3c35e /pp_sys.c
parentde5e01c2603e3fa2c0e1b6603c7f4f31802c829d (diff)
downloadperl-5ee74a8413ea165905e4d6df1d5c311295897dfc.tar.gz
pp_sys.c: some Coverity findings: NULL guards for io pointers
Message-Id: <20060408155232.4C9726D08C@ugli.hut.fi> Date: Sat, 8 Apr 2006 18:52:32 +0300 (EEST) p4raw-id: //depot/perl@27755
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 7a3dbc7948..1db57b05cb 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2276,7 +2276,7 @@ PP(pp_socket)
if (!gv || !io) {
if (ckWARN2(WARN_UNOPENED,WARN_CLOSED))
report_evil_fh(gv, io, PL_op->op_type);
- if (IoIFP(io))
+ if (io && IoIFP(io))
do_close(gv, FALSE);
SETERRNO(EBADF,LIB_INVARG);
RETPUSHUNDEF;
@@ -2332,9 +2332,9 @@ PP(pp_sockpair)
if (!gv2 || !io2)
report_evil_fh(gv1, io2, PL_op->op_type);
}
- if (IoIFP(io1))
+ if (io1 && IoIFP(io1))
do_close(gv1, FALSE);
- if (IoIFP(io2))
+ if (io2 && IoIFP(io2))
do_close(gv2, FALSE);
RETPUSHUNDEF;
}