summaryrefslogtreecommitdiff
path: root/nor-utils/rfddump.c
diff options
context:
space:
mode:
authorliaohua <liaohua4@huawei.com>2022-02-18 11:22:19 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-10-04 23:29:26 +0200
commit59fe9659c82e78bb02d06aa2581ba78061304013 (patch)
tree0640cb64e52ae0805942da1f4c044a92799cba16 /nor-utils/rfddump.c
parentb83c64f7a12538417649accc1269c22d5ff074bb (diff)
nor-utils: fix memory leak
This patch replace "free(rfd.sector_map)" with "free(rfd.header)" to fix memory leak. Signed-off-by: liaohua <liaohua4@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'nor-utils/rfddump.c')
-rw-r--r--nor-utils/rfddump.c2
1 files changed, 1 insertions, 1 deletions
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;
}