Felix Singer has submitted this change. ( https://review.coreboot.org/c/flashrom/+/69472 )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: tree/: Make heap alloc checks err msg consistent ......................................................................
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 --- M flashrom.c M layout.c 2 files changed, 16 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved
diff --git a/flashrom.c b/flashrom.c index 51a6b64..fde6d5a 100644 --- a/flashrom.c +++ b/flashrom.c @@ -454,7 +454,7 @@ 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 @@
uint8_t *readbuf = malloc(len); if (!readbuf) { - msg_gerr("Could not allocate memory!\n"); + msg_gerr("Out of memory!\n"); return -1; }
diff --git a/layout.c b/layout.c index be88428..2d18f83 100644 --- a/layout.c +++ b/layout.c @@ -145,7 +145,7 @@
tmp = malloc(sizeof(*tmp)); if (tmp == NULL) { - msg_gerr("Could not allocate memory"); + msg_gerr("Out of memory"); goto error; }