]> git.ipfire.org Git - thirdparty/elfutils.git/commit
src/readelf.c: Close skel_fd
authorAaron Merey <amerey@redhat.com>
Sat, 25 Jan 2025 01:21:57 +0000 (20:21 -0500)
committerAaron Merey <amerey@redhat.com>
Sat, 25 Jan 2025 01:21:57 +0000 (20:21 -0500)
commit0a33efadcd2df8afad97359d2354d319612741dd
tree5f81c4175118012080e28968b5d79be40bfa20b1
parent1be0787d6654ed71bf659e8bfd34895fea7589eb
src/readelf.c: Close skel_fd

skel_fd is passed to create_dwfl, which calls dup() on skel_fd.
create_dwfl handles closing the duped fd but not the original.

Ensure the original skel_fd is closed after it's passed to create_dwfl.

Signed-off-by: Aaron Merey <amerey@redhat.com>
src/readelf.c