From 220e92bc20a74dd005ecf057d7de25e8db8b9b25 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 25 Jan 2018 08:41:27 +0100 Subject: uimage: fix memory leak in error path handle->name is dynamically allocated, so free it in the error path. Signed-off-by: Sascha Hauer Reported-by: Stefan Lengfeld --- common/uimage.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/uimage.c') diff --git a/common/uimage.c b/common/uimage.c index b6f0f109ca..e857c11d37 100644 --- a/common/uimage.c +++ b/common/uimage.c @@ -202,6 +202,8 @@ again: return handle; err_out: close(fd); + + free(handle->name); free(handle); if (IS_BUILTIN(CONFIG_FS_TFTP) && !stat(uimage_tmp, &s)) unlink(uimage_tmp); -- cgit v1.2.3