diff mbox

[U-Boot,1/2] mkimage: Fix missing free() in show_valid_options()

Message ID 1477509552-9047-1-git-send-email-sjg@chromium.org
State Accepted
Commit 0cd82e255fb0960fd566459b1dbcb54b6b61504d
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Oct. 26, 2016, 7:19 p.m. UTC
The allocated memory should be freed. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 150963)
---

 tools/mkimage.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini Oct. 26, 2016, 9:49 p.m. UTC | #1
On Wed, Oct 26, 2016 at 01:19:11PM -0600, Simon Glass wrote:

> The allocated memory should be freed. Fix it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reported-by: Coverity (CID: 150963)

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox

Patch

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 3c594a0..521fa80 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -64,6 +64,7 @@  static int show_valid_options(enum ih_category category)
 			genimg_get_cat_name(category, item));
 	}
 	fprintf(stderr, "\n");
+	free(order);
 
 	return 0;
 }