aboutsummaryrefslogtreecommitdiff
path: root/fs/squashfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs')
-rw-r--r--fs/squashfs/sqfs.c3
-rw-r--r--fs/squashfs/sqfs_inode.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index dca13bd1f1..29805c3c6f 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -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);
diff --git a/fs/squashfs/sqfs_inode.c b/fs/squashfs/sqfs_inode.c
index e76ec7cbdf..d25cfb53e7 100644
--- a/fs/squashfs/sqfs_inode.c
+++ b/fs/squashfs/sqfs_inode.c
@@ -6,6 +6,7 @@
*/
#include <asm/unaligned.h>
+#include <compiler.h>
#include <errno.h>
#include <stdint.h>
#include <stdio.h>