public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [RFA] bucomm.c (make_tempname): Stop memory leak.
@ 2011-03-08 22:57 Michael Snyder
  2011-03-25 17:51 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2011-03-08 22:57 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 5 bytes --]

OK?


[-- Attachment #2: bucomm.txt --]
[-- Type: text/plain, Size: 606 bytes --]

2011-03-08  Michael Snyder  <msnyder@vmware.com>

	* bucomm.c (make_tempname): Stop memory leak.

Index: bucomm.c
===================================================================
RCS file: /cvs/src/src/binutils/bucomm.c,v
retrieving revision 1.42
diff -u -p -r1.42 bucomm.c
--- bucomm.c	6 Jan 2011 11:34:28 -0000	1.42
+++ bucomm.c	8 Mar 2011 22:55:10 -0000
@@ -511,7 +511,10 @@ make_tempname (char *filename)
   fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
 #endif
   if (fd == -1)
-    return NULL;
+    {
+      free (tmpname);
+      return NULL;
+    }
   close (fd);
   return tmpname;
 }

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

* Re: [RFA] bucomm.c (make_tempname): Stop memory leak.
  2011-03-08 22:57 [RFA] bucomm.c (make_tempname): Stop memory leak Michael Snyder
@ 2011-03-25 17:51 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2011-03-25 17:51 UTC (permalink / raw)
  To: Michael Snyder; +Cc: binutils

Hi Michael,

> 2011-03-08  Michael Snyder<msnyder@vmware.com>
>
> 	* bucomm.c (make_tempname): Stop memory leak.

Approved and applied.

Cheers
   Nick

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

end of thread, other threads:[~2011-03-25 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-08 22:57 [RFA] bucomm.c (make_tempname): Stop memory leak Michael Snyder
2011-03-25 17:51 ` Nick Clifton

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).