From 634317cc91202304c1477a6d738d7c7691b80419 Mon Sep 17 00:00:00 2001 From: Kim Christensen Date: Wed, 18 Sep 2019 16:48:23 +0200 Subject: state: backend_bucket_circular: fix double free() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/barebox-state/backend_bucket_circular.c | 1 - 1 file changed, 1 deletion(-) 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; } -- cgit v1.2.3