Fix a memory leak when processing archives.

PR 22449
	* ar.c (write_archive): Free the temporary file name.
This commit is contained in:
Nick Clifton
2017-11-17 12:44:16 +00:00
parent 2c244f9b09
commit 3cfd3dd095
2 changed files with 6 additions and 0 deletions

View File

@@ -1197,6 +1197,7 @@ write_archive (bfd *iarch)
if (smart_rename (new_name, old_name, 0) != 0)
xexit (1);
free (old_name);
free (new_name);
}
/* Return a pointer to the pointer to the entry which should be rplacd'd