Attention is currently required from: Edward O'Callaghan, Peter Marheine.

Peter Marheine uploaded patch set #2 to this change.

View Change

libflashrom: clear layout on flashrom_layout_release

This changes the behavior of flashrom_layout_release to always clear the
provided layout, even if it is the global layout (as is currently always
the case).

Not clearing it causes confusing behavior where a user may release a
layout and create a new one, but because it's always the global layout
which wasn't cleared there will be stale information in the returned
layout. This can easily lead to writing unexpected flash regions because
the API provides no way to stop including regions, and makes it
effectively impossible to stop including a region without completely
tearing down the library.

Change-Id: I8ba4b356f2a40ccbfd4e91f81af01d5f6a6de515
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
---
M cli_classic.c
M flash.h
M layout.c
3 files changed, 8 insertions(+), 14 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/47/54147/2

To view, visit change 54147. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8ba4b356f2a40ccbfd4e91f81af01d5f6a6de515
Gerrit-Change-Number: 54147
Gerrit-PatchSet: 2
Gerrit-Owner: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine@chromium.org>
Gerrit-MessageType: newpatchset