diff options
author | Nick Clifton <nickc@redhat.com> | 2011-03-25 17:51:10 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2011-03-25 17:51:10 +0000 |
commit | c48d800e1527375235d7030199eb284228e4c55c (patch) | |
tree | 08d56d95c4c7c3cdc05edd5f8cc7f48fb19ede0f /binutils/bucomm.c | |
parent | 4b41844bd9fdecbdc78d288f7d6b3012fee49b17 (diff) | |
download | binutils-gdb-c48d800e1527375235d7030199eb284228e4c55c.tar.gz |
* bucomm.c (make_tempname): Stop memory leak.
ICVS: ----------------------------------------------------------------------
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r-- | binutils/bucomm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c index 77afc1084a8..9977b50137f 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; } |