summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Christensen <kch@skov.dk>2019-09-18 16:48:23 +0200
committerRoland Hieber <rhi@pengutronix.de>2019-09-23 10:24:26 +0200
commit634317cc91202304c1477a6d738d7c7691b80419 (patch)
tree5827f203bc90955585ceec3d8d69403a37a32b88
parentd1e4783c00517cc05b94aee066758e60145794b8 (diff)
state: backend_bucket_circular: fix double free()HEADmaster
The function state_mtd_peb_read() is only a user of buf and not its owner, hence it may not deallocate it. Signed-off-by: Kim Christensen <kch@skov.dk> Reviewed-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
-rw-r--r--src/barebox-state/backend_bucket_circular.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/barebox-state/backend_bucket_circular.c b/src/barebox-state/backend_bucket_circular.c
index aec17b3..f665c3b 100644
--- a/src/barebox-state/backend_bucket_circular.c
+++ b/src/barebox-state/backend_bucket_circular.c
@@ -177,7 +177,6 @@ static int state_mtd_peb_read(struct state_backend_storage_bucket_circular *circ
if (ret < 0) {
dev_err(circ->dev, "Failed to read circular storage len %d, %d\n",
len, ret);
- free(buf);
return ret;
}