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

ICVS: ----------------------------------------------------------------------
This commit is contained in:
Nick Clifton 2011-03-25 17:51:10 +00:00
parent 4b41844bd9
commit c48d800e15
2 changed files with 5 additions and 1 deletions

View File

@ -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>

View File

@ -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;
}