summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-07-15 09:35:45 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-07-15 09:35:57 +0900
commit00a97d94122c256f4abe9375d19eaeb0f2eca201 (patch)
treec111fbf210fa5dd0cbc25c4068d3ed85b241f340 /mjit_worker.c
parentff3704031a6c23ae2020576c4fecbdc6b1c91246 (diff)
Always call va_end in form_args()
This issue is detected by Coverity Scan.
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index c5df0b7..2ee9a53 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -528,7 +528,8 @@ form_args(int num, ...)
n = args_len(args);
if ((tmp = (char **)realloc(res, sizeof(char *) * (len + n + 1))) == NULL) {
free(res);
- return NULL;
+ res = NULL;
+ break;
}
res = tmp;
MEMCPY(res + len, args, char *, n + 1);