diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-04-08 21:52:32 +0300 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-10 11:56:21 +0000 |
commit | 5ee74a8413ea165905e4d6df1d5c311295897dfc (patch) | |
tree | 6c66638c831ba58a4b6b0e26fdab9e0533f3c35e /pp_sys.c | |
parent | de5e01c2603e3fa2c0e1b6603c7f4f31802c829d (diff) | |
download | perl-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |