summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-05-31 09:42:36 +1000
committerNico Huber <nico.h@gmx.de>2021-06-08 14:56:00 +0000
commit4332e7c04ec460472ed18792638f67cc44e6054c (patch)
tree16dc41e833936d4142bdc3602c31ae609178ab61 /flashrom.c
parent72af02b60fcedece3191316408b99da90ee96509 (diff)
downloadflashrom-4332e7c04ec460472ed18792638f67cc44e6054c.tar.gz
flashrom-4332e7c04ec460472ed18792638f67cc44e6054c.tar.bz2
flashrom-4332e7c04ec460472ed18792638f67cc44e6054c.zip
dummyflasher.c: Fix data leak in params processing error paths
This patch extracts params processing into a separate function. Now all error paths of params processing return 1 back to init function which frees data. And there was just one more error path in init function where free(data) needed to be added. This is a follow up on commit 3b8fe0f8e907c0ba9f7c7935e950f3e1538d427f which moves global state into spi_master data. A good side-effect of the change is: init function becomes easier to read. BUG=b:185191942 TEST=ninja test Change-Id: I04f55f77bb4703f1d88b2191c45a22be3c97bf87 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/54748 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'flashrom.c')
0 files changed, 0 insertions, 0 deletions