Skip to content

Commit f17e8b3

Browse files
maurizio-lombardiigaw
authored andcommitted
nvme-print-json: add missing va_end()
Every va_start() should be matched by a corresponding va_end() to keep the static analyzers happy. Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
1 parent 2324758 commit f17e8b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nvme-print-json.c

+2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ static void obj_add_result(struct json_object *o, const char *v, ...)
144144
else
145145
obj_add_str(o, "Result", "Could not allocate string");
146146

147+
va_end(ap);
147148
free(value);
148149
}
149150

@@ -162,6 +163,7 @@ static void obj_add_key(struct json_object *o, const char *k, const char *v, ...
162163
else
163164
obj_add_str(o, k, "Could not allocate string");
164165

166+
va_end(ap);
165167
free(value);
166168
}
167169

0 commit comments

Comments
 (0)