diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2020-06-04 19:49:36 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2020-07-22 18:02:18 +0100 |
commit | e3f17159e26fc9b10625725e4d544693741cddb8 (patch) | |
tree | c6420da5dccab491b167074ded3cb02eed7b83d5 /libctf/ctf-link.c | |
parent | libctf, link: add lazy linking: clean up input members: err/warn cleanup (diff) | |
download | binutils-gdb-e3f17159e26fc9b10625725e4d544693741cddb8.tar.gz binutils-gdb-e3f17159e26fc9b10625725e4d544693741cddb8.tar.bz2 binutils-gdb-e3f17159e26fc9b10625725e4d544693741cddb8.zip |
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.
Diffstat (limited to 'libctf/ctf-link.c')
-rw-r--r-- | libctf/ctf-link.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c index 705701d0eb5..fa15c9bf9bb 100644 --- a/libctf/ctf-link.c +++ b/libctf/ctf-link.c @@ -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: |