diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-10-19 14:20:36 +0200 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-09-29 17:05:10 +0000 |
commit | d92dd50bcac6b2d0dfffa9f983712f7400990f3d (patch) | |
tree | 957fbc3c081425b31aeba3fb9c44451397323e94 /mstarddc_spi.c | |
parent | 4af3609828a980bad9ecaf99365f99305d4180f8 (diff) | |
download | flashrom-d92dd50bcac6b2d0dfffa9f983712f7400990f3d.tar.gz flashrom-d92dd50bcac6b2d0dfffa9f983712f7400990f3d.tar.bz2 flashrom-d92dd50bcac6b2d0dfffa9f983712f7400990f3d.zip |
it87spi.c: Prevent use-after-free bug
The memory for the `param` string is aliased by `dualbiosindex_suffix`.
Moreover, `errno` could have been modified by the call to `free()`.
Therefore, only free the former when there are no more uses of either.
Change-Id: I79f18f6077c77c0cbb8bfa431e17f9b079f11c95
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/46551
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67866
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'mstarddc_spi.c')
0 files changed, 0 insertions, 0 deletions