mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Denis Orlov <denorl2009@gmail.com>
To: barebox@lists.infradead.org
Cc: Denis Orlov <denorl2009@gmail.com>
Subject: [PATCH 2/3] MIPS: bootm: do not leak memory on error in of_overlay_load_firmware()
Date: Wed, 15 Mar 2023 11:59:52 +0300	[thread overview]
Message-ID: <20230315085953.4094660-3-denorl2009@gmail.com> (raw)
In-Reply-To: <20230315085953.4094660-1-denorl2009@gmail.com>

Signed-off-by: Denis Orlov <denorl2009@gmail.com>
---
 arch/mips/lib/bootm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 95e9dc0d7d..69ce9b3904 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -69,7 +69,7 @@ static int do_bootm_elf(struct image_data *data)
 
 	ret = of_overlay_load_firmware();
 	if (ret)
-		return ret;
+		goto bootm_free_fdt;
 
 	shutdown_barebox();
 
-- 
2.30.2




  parent reply	other threads:[~2023-03-15  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15  8:59 [PATCH 0/3] MIPS: bootm: tiny fixes in do_bootm_elf() Denis Orlov
2023-03-15  8:59 ` [PATCH 1/3] MIPS: bootm: do not free fdt pointer that contains an error Denis Orlov
2023-03-15  8:59 ` Denis Orlov [this message]
2023-03-15  8:59 ` [PATCH 3/3] MIPS: bootm: remove unnecessary phys/virt conversions Denis Orlov
2023-03-16  8:59 ` [PATCH 0/3] MIPS: bootm: tiny fixes in do_bootm_elf() Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230315085953.4094660-3-denorl2009@gmail.com \
    --to=denorl2009@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox