diff mbox series

[PULL,3/3] target/hexagon/opcodes: Add missing varargs cleanup

Message ID 20210307013905.115019-4-richard.henderson@linaro.org
State New
Headers show
Series Hexagon patch queue | expand

Commit Message

Richard Henderson March 7, 2021, 1:39 a.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>


Fix a trivial incorrect usage of variable argument macros detected
by Coverity (missing_va_end: va_end was not called for ap).

Fixes: Coverity CID 1446720 (VARARGS)
Fixes: e3c00c2ed75 ("Hexagon (target/hexagon) opcode data structures")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Tested-by: Taylor Simpson <tsimpson@quicinc.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>

Message-Id: <20210223111253.2831285-1-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/hexagon/opcodes.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.25.1
diff mbox series

Patch

diff --git a/target/hexagon/opcodes.c b/target/hexagon/opcodes.c
index 4eef5fc40f..35d790cdd5 100644
--- a/target/hexagon/opcodes.c
+++ b/target/hexagon/opcodes.c
@@ -82,6 +82,7 @@  static void init_attribs(int tag, ...)
     while ((attr = va_arg(ap, int)) != 0) {
         set_bit(attr, opcode_attribs[tag]);
     }
+    va_end(ap);
 }
 
 const OpcodeEncoding opcode_encodings[] = {