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

Fixes: 86f4695b ("image: Fix Android boot image support")
Reviewed-by: Mattijs Korpershoek <mkorpersh...@baylibre.com>
Signed-off-by: Nicolas Belin <nbe...@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

Reply via email to