Skip to content
Snippets Groups Projects
Commit 220fa478 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt :speech_balloon: Committed by Tom Rini
Browse files

fs/squashfs: NULL dereference in sqfs_closedir()


sqfs_opendir() called in sqfs_size(), sqfs_read(), sqfs_exists() may fail
leading to sqfs_closedir(NULL) being called. Do not dereference NULL.

Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent da7991b3
No related branches found
No related tags found
No related merge requests found
......@@ -1716,6 +1716,9 @@ void sqfs_closedir(struct fs_dir_stream *dirs)
{
struct squashfs_dir_stream *sqfs_dirs;
if (!dirs)
return;
sqfs_dirs = (struct squashfs_dir_stream *)dirs;
free(sqfs_dirs->inode_table);
free(sqfs_dirs->dir_table);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment