[PATCH] Fix file descriptor and memory leak in pmap_set
Jakub Jelinek
jakub@redhat.com
Tue Dec 30 13:36:00 GMT 2003
Hi!
CLNT_DESTROY is needed both in the success and failure cases.
2003-12-30 Jakub Jelinek <jakub@redhat.com>
* sunrpc/pmap_clnt.c (pmap_set): Do CLNT_DESTROY even if CLNT_CALL
failed. Reported by Steve Grubb.
--- libc/sunrpc/pmap_clnt.c.jj 2002-08-06 03:23:20.000000000 +0200
+++ libc/sunrpc/pmap_clnt.c 2003-12-30 14:03:52.000000000 +0100
@@ -135,7 +135,7 @@ pmap_set (u_long program, u_long version
tottimeout) != RPC_SUCCESS)
{
clnt_perror (client, _("Cannot register service"));
- return FALSE;
+ rslt = FALSE;
}
CLNT_DESTROY (client);
/* (void)close(socket); CLNT_DESTROY closes it */
Jakub
More information about the Libc-hacker
mailing list