diff options
author | Benjamin Sugars <bsugars@canoe.ca> | 2001-03-26 08:29:54 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-26 18:44:32 +0000 |
commit | 571714202f6d2012220ed718d95c0404dd890ea5 (patch) | |
tree | 583f1bc96cd05d06fbc5939073065c049266e501 /pp_sys.c | |
parent | a782ae34f4d6fddabf5ccada2e1bac94cd779cb4 (diff) | |
download | perl-571714202f6d2012220ed718d95c0404dd890ea5.tar.gz |
socket() leaks file descriptors
Message-ID: <Pine.LNX.4.21.0103261315510.2729-100000@marmot.rim.canoe.ca>
Also sockpair() fixed similarly.
p4raw-id: //depot/perl@9363
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2205,6 +2205,9 @@ PP(pp_socket) RETPUSHUNDEF; } + if (IoIFP(io)) + do_close(gv, FALSE); + TAINT_PROPER("socket"); fd = PerlSock_socket(domain, type, protocol); if (fd < 0) @@ -2263,6 +2266,9 @@ PP(pp_sockpair) RETPUSHUNDEF; } + if (IoIFP(io)) + do_close(gv, FALSE); + TAINT_PROPER("socketpair"); if (PerlSock_socketpair(domain, type, protocol, fd) < 0) RETPUSHUNDEF; |