summaryrefslogtreecommitdiffstats
path: root/common/state/backend_format_raw.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2017-04-21 10:53:25 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-04-21 14:41:34 +0200
commitec01cbce2165deb3d814f0c031043fa999632eaa (patch)
tree27035c6fa9ff3c91090dad10d79d5c88883e2178 /common/state/backend_format_raw.c
parentc0befa7cd0a16c6f3512124dac377fc9e1f46e34 (diff)
downloadbarebox-ec01cbce2165deb3d814f0c031043fa999632eaa.tar.gz
barebox-ec01cbce2165deb3d814f0c031043fa999632eaa.tar.xz
state: Fix "pack" returning freed data for DTB backend
`state_backend_format_dtb_pack()` passes a buffer containing state packed in flattened DTB format back to its caller via its `buf` parameter. It then frees the buffer before returning. This means the caller (`state_save()`) will be working on freed buffer contents before freeing the buffer a second time itself. Fix it by removing the spurious call to `free()`. This should fix a bug reported by Norbert Wiedmann in <http://lists.infradead.org/pipermail/barebox/2017-April/029980.html>. Cc: Norbert Wiedmann <info@n-wiedmann.de> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_format_raw.c')
0 files changed, 0 insertions, 0 deletions