[PATCH 5/8] membuf: Correct implementation of membuf_dispose()

Simon Glass sjg at chromium.org
Fri Oct 18 05:00:24 CEST 2024


This should free the pointer, not the address of the pointer. Fix it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 lib/membuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/membuf.c b/lib/membuf.c
index b13998ccdbd..695d16d051e 100644
--- a/lib/membuf.c
+++ b/lib/membuf.c
@@ -384,6 +384,6 @@ void membuf_uninit(struct membuf *mb)
 
 void membuf_dispose(struct membuf *mb)
 {
-	free(&mb->start);
+	free(mb->start);
 	membuf_uninit(mb);
 }
-- 
2.34.1



More information about the U-Boot mailing list