mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-17 21:03:55 +08:00
libctf, link: fix ctf_link_write fd leak
We were leaking the fd on every invocation. libctf/ * ctf-link.c (ctf_link_write): Close the fd.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* ctf-link.c (ctf_link_write): Close the fd.
|
||||
|
||||
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* Makefile.am: Set -DNOBFD=1 in libctf-nobfd, and =0 elsewhere.
|
||||
|
@ -1071,6 +1071,7 @@ ctf_link_write (ctf_file_t *fp, size_t *size, size_t threshold)
|
||||
free (arg.dynames[i]);
|
||||
free (arg.dynames);
|
||||
}
|
||||
fclose (f);
|
||||
return buf;
|
||||
|
||||
err_no:
|
||||
|
Reference in New Issue
Block a user