Skip to content

Commit 925ee1e

Browse files
authored
Merge pull request #211 from madhuthorat/upstatdfail_fdclose
In clnt_tli_ncreate() close FD in case client creation failed
2 parents dadc0cd + 094c355 commit 925ee1e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/clnt_generic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ clnt_tli_ncreate(int fd, const struct netconfig *nconf,
401401
goto err;
402402
}
403403

404+
if (CLNT_FAILURE(cl))
405+
goto err1;
406+
404407
if (flags & CLNT_CREATE_FLAG_CLOSE) {
405408
/* We got a new FD; this makes it a local client */
406409
cl->cl_flags |= CLNT_FLAG_LOCAL;

0 commit comments

Comments
 (0)