membuf: Correct implementation of membuf_dispose()
authorSimon Glass <sjg@chromium.org>
Tue, 18 Mar 2025 15:20:46 +0000 (16:20 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 3 Apr 2025 22:54:49 +0000 (16:54 -0600)
This should free the pointer, not the address of the pointer. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/membuf.c

index b13998c..695d16d 100644 (file)
@@ -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);
 }