projects
/
mtd-utils.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b83c64f
)
nor-utils: fix memory leak
author
liaohua <liaohua4@huawei.com>
Fri, 18 Feb 2022 03:22:19 +0000
(11:22 +0800)
committer
David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Tue, 4 Oct 2022 21:29:26 +0000
(23:29 +0200)
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>
nor-utils/rfddump.c
patch
|
blob
|
history
diff --git
a/nor-utils/rfddump.c
b/nor-utils/rfddump.c
index 01ab4c2dcf0086bf82de459da52b157719afb982..78ec443a54e9d2fa9943b040bff19d9098a5606d 100644
(file)
--- 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;
}