From: liaohua Date: Fri, 18 Feb 2022 03:22:19 +0000 (+0800) Subject: nor-utils: fix memory leak X-Git-Tag: v2.1.5~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=59fe9659c82e78bb02d06aa2581ba78061304013;p=mtd-utils.git 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 --- 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; }