diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-07-15 09:35:45 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-07-15 09:35:57 +0900 |
commit | 00a97d94122c256f4abe9375d19eaeb0f2eca201 (patch) | |
tree | c111fbf210fa5dd0cbc25c4068d3ed85b241f340 /mjit_worker.c | |
parent | ff3704031a6c23ae2020576c4fecbdc6b1c91246 (diff) | |
download | ruby-00a97d94122c256f4abe9375d19eaeb0f2eca201.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c index c5df0b7fad..2ee9a5310e 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); |