mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: fix a mismatch of malloc'ed type
Coverity Scan found this issue.
This commit is contained in:
parent
424ad9a493
commit
8bddf1bc9b
1 changed files with 2 additions and 2 deletions
4
mjit.c
4
mjit.c
|
@ -731,8 +731,8 @@ split_flags(const char *flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char **ret = xmalloc(sizeof(char **) * (i + 1));
|
char **ret = xmalloc(sizeof(char *) * (i + 1));
|
||||||
memcpy((void *)ret, buf, sizeof(char **) * i);
|
memcpy(ret, buf, sizeof(char *) * i);
|
||||||
ret[i] = NULL;
|
ret[i] = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue