diff options
author | Nick Clifton <nickc@redhat.com> | 2011-03-25 17:51:09 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2011-03-25 17:51:09 +0000 |
commit | 9a3c6177d97bb21333517f6428e562401f77e73f (patch) | |
tree | 955d37a138950d792e7bb88ff34e69face838c1c /binutils | |
parent | a2b64b881f7a96a2795729db44fc3b413f6a5e87 (diff) | |
download | binutils-redhat-9a3c6177d97bb21333517f6428e562401f77e73f.tar.gz |
* bucomm.c (make_tempname): Stop memory leak.
ICVS: ----------------------------------------------------------------------
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 1 | ||||
-rw-r--r-- | binutils/bucomm.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d17deffb38..1497663219 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -19,6 +19,7 @@ (parse_stab_members): Likewise. (stab_demangle_qualified): Likewise. * objdump.c (dump_reloc_set): Free malloced memory. + * bucomm.c (make_tempname): Stop memory leak. 2011-03-25 Pierre Muller <muller@ics.u-strasbg.fr> diff --git a/binutils/bucomm.c b/binutils/bucomm.c index 77afc1084a..9977b50137 100644 --- a/binutils/bucomm.c +++ b/binutils/bucomm.c @@ -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; } |