From 59fe9659c82e78bb02d06aa2581ba78061304013 Mon Sep 17 00:00:00 2001 From: liaohua Date: Fri, 18 Feb 2022 11:22:19 +0800 Subject: nor-utils: fix memory leak This patch replace "free(rfd.sector_map)" with "free(rfd.header)" to fix memory leak. Signed-off-by: liaohua Signed-off-by: David Oberhollenzer --- nor-utils/rfddump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nor-utils') diff --git a/nor-utils/rfddump.c b/nor-utils/rfddump.c index 01ab4c2..78ec443 100644 --- a/nor-utils/rfddump.c +++ b/nor-utils/rfddump.c @@ -256,7 +256,7 @@ int main(int argc, char *argv[]) if (!rfd.sector_map) { perror(PROGRAM_NAME); close(fd); - free(rfd.sector_map); + free(rfd.header); return 2; } -- cgit v1.2.3