diff options
author | wtc%netscape.com <devnull@localhost> | 1999-04-23 19:45:24 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1999-04-23 19:45:24 +0000 |
commit | 26baa4fbeca975ca30b87a6e83208fb3c8ef0167 (patch) | |
tree | 8dacb590c9887da23e5824567d18e6934b228997 | |
parent | d2bbc014aa5af47a57ac9ead2fa4395a2739cffe (diff) | |
download | nspr-hg-26baa4fbeca975ca30b87a6e83208fb3c8ef0167.tar.gz |
Bugsplat bug #350054: in the NT implementation of SocketTransmitFile,
free the PRFileDesc only if the file is successfully transmitted.
-rw-r--r-- | pr/src/io/prsocket.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pr/src/io/prsocket.c b/pr/src/io/prsocket.c index d8c0785d..548f9215 100644 --- a/pr/src/io/prsocket.c +++ b/pr/src/io/prsocket.c @@ -877,10 +877,7 @@ PRIntervalTime timeout) rv = _PR_MD_TRANSMITFILE( sd, fd, headers, hlen, flags, timeout); - if (rv < 0) { - rv = -1; - } - if (flags & PR_TRANSMITFILE_CLOSE_SOCKET) { + if ((rv >= 0) && (flags == PR_TRANSMITFILE_CLOSE_SOCKET)) { /* * This should be kept the same as SocketClose, except * that _PR_MD_CLOSE_SOCKET(sd->secret->md.osfd) should |