diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2022-11-25 19:49:16 +1100 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2022-12-09 12:30:44 +0000 |
commit | 59ce5615b768fe9d4d2506cb13c6781cd83a12e6 (patch) | |
tree | 7b1754b78fece212ca9aaa2aaf2b8329a660382f /bindings/rust/libflashrom/src/log.c | |
parent | 819c27507466a0dcd836d7deebe0775b8f3f5e96 (diff) | |
download | flashrom-59ce5615b768fe9d4d2506cb13c6781cd83a12e6.tar.gz flashrom-59ce5615b768fe9d4d2506cb13c6781cd83a12e6.tar.bz2 flashrom-59ce5615b768fe9d4d2506cb13c6781cd83a12e6.zip |
layout: Check return values for strdup in register_include_arg
strdup return values should be checked for NULL to catch the
potential error case of out of memory.
This patch re-writes ternary conditionals so that strdup return
values could be checked for all branches fof execution.
Follow up on
commit 45d50a101e8073191e6d88143990ed91d3bfe815
Ticket: https://ticket.coreboot.org/issues/372
Change-Id: I6c22196be6847a8c9704f1de936604a51b4b8a28
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70006
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'bindings/rust/libflashrom/src/log.c')
0 files changed, 0 insertions, 0 deletions