lkml.org 
[lkml]   [2022]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH v2 8/8] objtool: explicitly cleanup resources on success
Previously the file was only closed and resources properly freed on
errors, not on normal exits.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/objtool/builtin-check.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index 7c175198d09f..e11c766b98ce 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -229,5 +229,7 @@ int objtool_run(int argc, const char **argv)
if (file->elf->changed)
return elf_write(file->elf);

+ elf_close(file->elf);
+
return 0;
}
--
2.39.0

\
 
 \ /
  Last update: 2023-03-26 23:21    [W:0.992 / U:2.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site