From e4667f1cd33efe8fd3346702d260c031240434b8 Mon Sep 17 00:00:00 2001 From: Ulrich Ölmann Date: Mon, 30 Sep 2019 08:41:36 +0200 Subject: state: backend_bucket_circular: fix double free() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 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 | Reviewed-by: Ulrich Ölmann | Reviewed-by: Uwe Kleine-König | Signed-off-by: Roland Hieber Signed-off-by: Ulrich Ölmann Signed-off-by: Sascha Hauer --- common/state/backend_bucket_circular.c | 1 - 1 file changed, 1 deletion(-) (limited to 'common/state/backend_bucket_circular.c') 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; } -- cgit v1.2.3