boot: Use provided filename with bootmeth_alloc_other()

Rather than using bflow->fname, which assumes that it is the same as the
passed-in filename, use the passed in filename. This can be different in
some cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-02 06:50:04 +12:00
parent 129a820581
commit 8af19e54f7

View File

@@ -388,8 +388,7 @@ int bootmeth_alloc_other(struct bootflow *bflow, const char *fname,
if (ret)
return log_msg_ret("all", ret);
if (!bootflow_img_add(bflow, bflow->fname, type, abuf_addr(buf),
size))
if (!bootflow_img_add(bflow, fname, type, abuf_addr(buf), size))
return log_msg_ret("boi", -ENOMEM);
return 0;