diff options
author | wtc%netscape.com <devnull@localhost> | 1999-11-30 23:52:34 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1999-11-30 23:52:34 +0000 |
commit | fc08c0a79521671a8bfa7de69055ad272c45b4d6 (patch) | |
tree | 790a3f5d350eb47de9e03a96640089a5a3c1b134 | |
parent | 56a069b53dab9d8c7a659f46226f88f79db41c16 (diff) | |
download | nspr-hg-fc08c0a79521671a8bfa7de69055ad272c45b4d6.tar.gz |
Bugzilla bug #20393: PR_NewPollableEvent should not assume that
PR_CreatePipe and PR_NewTCPSocketPair won't change its arguments
when it fails.
-rw-r--r-- | pr/src/io/prpolevt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pr/src/io/prpolevt.c b/pr/src/io/prpolevt.c index a345634d..cd855cdf 100644 --- a/pr/src/io/prpolevt.c +++ b/pr/src/io/prpolevt.c @@ -148,10 +148,12 @@ PR_IMPLEMENT(PRFileDesc *) PR_NewPollableEvent(void) #ifndef USE_TCP_SOCKETPAIR if (PR_CreatePipe(&fd[0], &fd[1]) == PR_FAILURE) { + fd[0] = fd[1] = NULL; goto errorExit; } #else if (PR_NewTCPSocketPair(fd) == PR_FAILURE) { + fd[0] = fd[1] = NULL; goto errorExit; } #endif |