mpsutil(8): let calloc(3) do the multiplying.

This commit is contained in:
Pedro F. Giffuni 2017-03-13 20:49:31 +00:00
parent 87959e27fd
commit 4b6fa244b2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315214

View File

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