diff options
author | Anton Berezin <tobez@tobez.org> | 2001-10-17 20:25:48 +0200 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2001-10-17 18:50:55 +0000 |
commit | a788c3849cdc557371e8ad787dfe6875cb619731 (patch) | |
tree | 833aed4dcd77e6139c6a7ba94b15ef638cf366c3 /pp_sys.c | |
parent | 32a4230e51efdc920aa83e3c10aa959a072e0012 (diff) | |
download | perl-a788c3849cdc557371e8ad787dfe6875cb619731.tar.gz |
coredump fix in pp_accept()
Message-Id: <20011017182548.A12082@heechee.tobez.org>
p4raw-id: //depot/perl@12478
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -2464,12 +2464,11 @@ PP(pp_accept) goto nuts; nstio = GvIOn(ngv); - if (IoIFP(nstio)) - do_close(ngv, FALSE); - fd = PerlSock_accept(PerlIO_fileno(IoIFP(gstio)), (struct sockaddr *)&saddr, &len); if (fd < 0) goto badexit; + if (IoIFP(nstio)) + do_close(ngv, FALSE); IoIFP(nstio) = PerlIO_fdopen(fd, "r"); IoOFP(nstio) = PerlIO_fdopen(fd, "w"); IoTYPE(nstio) = IoTYPE_SOCKET; |