U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Belin <nbelin@baylibre.com>
To: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	 Safae Ouajih <souajih@baylibre.com>,
	 Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	 Ahmad Draidi <ar2000jp@gmail.com>
Cc: u-boot@lists.denx.de, Nicolas Belin <nbelin@baylibre.com>
Subject: [PATCH v2 2/3] boot: android: free newbootargs when done
Date: Tue, 17 Dec 2024 14:29:09 +0100	[thread overview]
Message-ID: <20241217-fix-bootargs-concatenation-v2-2-b2fd7cf4e130@baylibre.com> (raw)
In-Reply-To: <20241217-fix-bootargs-concatenation-v2-0-b2fd7cf4e130@baylibre.com>

Free newbootargs when the concatenation is done and bootargs env
is set.

Fixes: 86f4695b ("image: Fix Android boot image support")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
---
 boot/image-android.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/boot/image-android.c b/boot/image-android.c
index 57158280b41c6552c82838e21384d925d5f7cde4..362a5c7435a3a8bcf7b674b96e31069a91a892b5 100644
--- a/boot/image-android.c
+++ b/boot/image-android.c
@@ -322,6 +322,7 @@ int android_image_get_kernel(const void *hdr,
 	}
 
 	env_set("bootargs", newbootargs);
+	free(newbootargs);
 
 	if (os_data) {
 		if (image_get_magic(ihdr) == IH_MAGIC) {

-- 
2.34.1


  parent reply	other threads:[~2024-12-17 13:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 13:29 [PATCH v2 0/3] boot: android: rework the bootargs concatenation Nicolas Belin
2024-12-17 13:29 ` [PATCH v2 1/3] boot: android: fix extra command line support Nicolas Belin
2024-12-17 13:29 ` Nicolas Belin [this message]
2024-12-17 13:29 ` [PATCH v2 3/3] boot: android: rework bootargs concatenation Nicolas Belin
2024-12-18 10:49   ` Mattijs Korpershoek
2024-12-18 13:05 ` [PATCH v2 0/3] boot: android: rework the " Mattijs Korpershoek

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=20241217-fix-bootargs-concatenation-v2-2-b2fd7cf4e130@baylibre.com \
    --to=nbelin@baylibre.com \
    --cc=ar2000jp@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=sjg@chromium.org \
    --cc=souajih@baylibre.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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