mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Fix memory leak in ar if it encounters an invalid path whilst extracting files.
* ar.c (extract_file): Free cbuf if the path is invalid.
This commit is contained in:
@ -1041,6 +1041,7 @@ extract_file (bfd *abfd)
|
|||||||
{
|
{
|
||||||
non_fatal (_("illegal pathname found in archive member: %s"),
|
non_fatal (_("illegal pathname found in archive member: %s"),
|
||||||
bfd_get_filename (abfd));
|
bfd_get_filename (abfd));
|
||||||
|
free (cbuf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user