mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
tree/: Make heap alloc checks err msg consistent
Change-Id: Id84a9f15c33781efc494ed36a1c7cec82a0333d6 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69472 Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
49bcb78006
commit
4e27cad44d
@ -454,7 +454,7 @@ static int check_erased_range(struct flashctx *flash, unsigned int start, unsign
|
||||
const uint8_t erased_value = ERASED_VALUE(flash);
|
||||
|
||||
if (!cmpbuf) {
|
||||
msg_gerr("Could not allocate memory!\n");
|
||||
msg_gerr("Out of memory!\n");
|
||||
exit(1);
|
||||
}
|
||||
memset(cmpbuf, erased_value, len);
|
||||
@ -513,7 +513,7 @@ int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int sta
|
||||
|
||||
uint8_t *readbuf = malloc(len);
|
||||
if (!readbuf) {
|
||||
msg_gerr("Could not allocate memory!\n");
|
||||
msg_gerr("Out of memory!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user