summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-02-23 12:12:53 +0100
committerRichard Henderson <richard.henderson@linaro.org>2021-03-06 17:35:43 -0800
commit2526e69efd8e386573212bf3ea05171a727a598b (patch)
treeeda8d776767db39f815efa7d52306df709a1fb5d
parent66a1807b8e384145664ccc98e432901c4df33f4e (diff)
downloadfocaccia-qemu-2526e69efd8e386573212bf3ea05171a727a598b.tar.gz
focaccia-qemu-2526e69efd8e386573212bf3ea05171a727a598b.zip
target/hexagon/opcodes: Add missing varargs cleanup
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>
-rw-r--r--target/hexagon/opcodes.c1
1 files changed, 1 insertions, 0 deletions
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[] = {