mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
* [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free()
@ 2019-09-18 14:48 Ulrich Ölmann
  2019-09-18 20:23 ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Ölmann @ 2019-09-18 14:48 UTC (permalink / raw)
  To: Pengutronix Public Open-Source-Development
  Cc: Ulrich Ölmann, Kim Christensen

From: Kim Christensen <kch@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 <kch@skov.dk>
Acked-by: Ulrich Ölmann <u.oelmann@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-23  8:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 14:48 [OSS-Tools] [PATCH dt-utils] state: backend_bucket_circular: fix double free() Ulrich Ölmann
2019-09-18 20:23 ` Uwe Kleine-König
2019-09-19  5:16   ` Ulrich Ölmann
2019-09-23  8:31     ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox