mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 19:28:36 +00:00
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;
|
||||
*firmware = calloc(1, sizeof(unsigned char) * size);
|
||||
*firmware = calloc(size, sizeof(unsigned char));
|
||||
if (*firmware == NULL) {
|
||||
warn("calloc");
|
||||
return (-1);
|
||||
|
|
Loading…
Reference in a new issue