[PATCH v2 06/14] fip: fix wrong function call
Sascha Hauer
s.hauer at pengutronix.de
Tue Mar 11 05:25:19 PDT 2025
fip_parse_buf() is to be called when a buffer shall be parsed that is
allocated externally and thus shall not be freed in fip_free(). This
is not what we want in fip_parse(), we want exactly the buffer to be
freed, so call fip_do_parse_buf() instead.
Fixes: 748ba06276 ("fip: add function to parse FIP from a buffer")
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
lib/fip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fip.c b/lib/fip.c
index aab2795476..8086b43412 100644
--- a/lib/fip.c
+++ b/lib/fip.c
@@ -274,7 +274,7 @@ int fip_parse(struct fip_state *fip,
return ret;
}
- ret = fip_parse_buf(fip, buf, size, toc_header_out);
+ ret = fip_do_parse_buf(fip, buf, size, toc_header_out);
if (ret)
free(buf);
--
2.39.5
More information about the barebox
mailing list