]> git.sur5r.net Git - u-boot/blobdiff - tools/relocate-rela.c
binman: Allow unit addresses for binaries
[u-boot] / tools / relocate-rela.c
index 3c9d134ac2647925efd517a6337da68d73521aba..6a524014b73c9e94fb6edfe20afe8b22c3e7149c 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+ OR BSD-2-Clause
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
- * SPDX-License-Identifier:    GPL-2.0+ BSD-2-Clause
- *
  * 64-bit and little-endian target only until we need to support a different
  * arch that needs this.
  */
@@ -27,9 +26,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)