public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix file descriptor and memory leak in pmap_set
@ 2003-12-30 13:36 Jakub Jelinek
  2003-12-30 17:57 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-12-30 13:36 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix file descriptor and memory leak in pmap_set
  2003-12-30 13:36 [PATCH] Fix file descriptor and memory leak in pmap_set Jakub Jelinek
@ 2003-12-30 17:57 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-12-30 17:57 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> 	* sunrpc/pmap_clnt.c (pmap_set): Do CLNT_DESTROY even if CLNT_CALL
> 	failed.  Reported by Steve Grubb.

Applied.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD4DBQE/8bv92ijCOnn/RHQRAlbbAKCH5FNjAyoX4fyTy6XZ6oBUqxFq9gCXYoBI
CgSLDIAdyG50xBSLeHn9og==
=ASnY
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-30 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-30 13:36 [PATCH] Fix file descriptor and memory leak in pmap_set Jakub Jelinek
2003-12-30 17:57 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).