mpsutil(8): let calloc(3) do the multiplying.
This commit is contained in:
parent
87959e27fd
commit
4b6fa244b2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315214
@ -486,7 +486,7 @@ mps_firmware_get(int fd, unsigned char **firmware, bool bios)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size = reply.ActualImageSize;
|
size = reply.ActualImageSize;
|
||||||
*firmware = calloc(1, sizeof(unsigned char) * size);
|
*firmware = calloc(size, sizeof(unsigned char));
|
||||||
if (*firmware == NULL) {
|
if (*firmware == NULL) {
|
||||||
warn("calloc");
|
warn("calloc");
|
||||||
return (-1);
|
return (-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user