summaryrefslogtreecommitdiffstats
path: root/common/state/backend_bucket_circular.c
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2019-09-30 08:41:36 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-14 12:52:11 +0200
commite4667f1cd33efe8fd3346702d260c031240434b8 (patch)
treece97c5fdc214c010a0b41e5368f1cef0d0d64532 /common/state/backend_bucket_circular.c
parent0fc5e074e4edcd7e88d2853cf50b0e32ecf6ad81 (diff)
downloadbarebox-e4667f1cd33efe8fd3346702d260c031240434b8.tar.gz
barebox-e4667f1cd33efe8fd3346702d260c031240434b8.tar.xz
state: backend_bucket_circular: fix double free()
This ports the following dt-utils commit (as the actual code that is changed is removed by the preprocesser when compiling barebox this patch is only of cosmetic nature to keep both code bases in sync): | commit 634317cc91202304c1477a6d738d7c7691b80419 | Author: Kim Christensen <kch@skov.dk> | Date: Wed Sep 18 16:48:23 2019 +0200 | | state: backend_bucket_circular: fix double free() | | 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> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_bucket_circular.c')
-rw-r--r--common/state/backend_bucket_circular.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index 612fa0cd8a..735510e0d3 100644
--- a/common/state/backend_bucket_circular.c
+++ b/common/state/backend_bucket_circular.c
@@ -178,7 +178,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;
}