The descriptor 'dwfl_fd' is created at nm.c:1278 by calling
function 'dup' and lost at nm.c:1593.

Found by RASU JSC.

Signed-off-by: Maks Mishin <maks.mishi...@gmail.com>
---
 src/nm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/nm.c b/src/nm.c
index 3675f59b..fee397dd 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -1521,6 +1521,8 @@ show_symbols (int fd, Ebl *ebl, GElf_Ehdr *ehdr,
     }
   if (dwfl != NULL)
     dwfl_end (dwfl);
+  if (dwfl_fd != NULL)
+    close(dwfl_fd);
 }
 
 
-- 
2.30.2

Reply via email to