summaryrefslogtreecommitdiff
path: root/tools/relocate-rela.c
diff options
context:
space:
mode:
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>2017-05-03 20:40:11 (GMT)
committerTom Rini <trini@konsulko.com>2017-05-05 20:45:57 (GMT)
commitd27e35f2564f751a3cc47daa5ab9897f04401a40 (patch)
treea3c91837a4c7955584341a1d4ad4b5219f37b89f /tools/relocate-rela.c
parent05d887b4619e54a2b7d487ac1c31b4544ce58533 (diff)
downloadu-boot-d27e35f2564f751a3cc47daa5ab9897f04401a40.tar.xz
relocate-rela: add missing va_end()
va_start must always be matched by va_end. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'tools/relocate-rela.c')
-rw-r--r--tools/relocate-rela.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c
index 3c9d134..df968eb 100644
--- a/tools/relocate-rela.c
+++ b/tools/relocate-rela.c
@@ -27,9 +27,11 @@ static void debug(const char *fmt, ...)
{
va_list args;
- va_start(args, fmt);
- if (debug_en)
+ if (debug_en) {
+ va_start(args, fmt);
vprintf(fmt, args);
+ va_end(args);
+ }
}
static bool supported_rela(Elf64_Rela *rela)