From: Kim Christensen <k...@skov.dk>

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 <k...@skov.dk>
Acked-by: Ulrich Ölmann <u.oelm...@pengutronix.de>
---
 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 aec17b312cab..f665c3b4539a 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;
        }
 
-- 
2.23.0


_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de

Reply via email to