projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40f2882
)
fs/squashfs: sqfs_read: fix dangling pointer dirs->entry
author
Richard Genoud
<richard.genoud@posteo.net>
Tue, 3 Nov 2020 11:11:11 +0000
(12:11 +0100)
committer
Marek Szyprowski
<m.szyprowski@samsung.com>
Mon, 15 Nov 2021 10:37:12 +0000
(11:37 +0100)
dirs->entry shouldn't be left dangling as it could be freed twice.
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
d1d8d75f69f82f7ef7c55b58a7d9e73055956f3c
]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ie76becc6bfb30341d1964a34154ebe4014def678
fs/squashfs/sqfs.c
patch
|
blob
|
history
diff --git
a/fs/squashfs/sqfs.c
b/fs/squashfs/sqfs.c
index 79a465e2036f298af16d3412963cbb9a3b0aac54..f824339d6a306f0399bb20c1e9121b6b8647c6e8 100644
(file)
--- a/
fs/squashfs/sqfs.c
+++ b/
fs/squashfs/sqfs.c
@@
-1339,6
+1339,7
@@
int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
break;
free(dirs->entry);
+ dirs->entry = NULL;
}
if (ret) {