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:
parent
ff3704031a
commit
00a97d9412
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue