1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Always call va_end in form_args()

This issue is detected by Coverity Scan.
This commit is contained in:
Takashi Kokubun 2019-07-15 09:35:45 +09:00
parent ff3704031a
commit 00a97d9412
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -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);