[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071019140518.GE3778@stusta.de>
Date: Fri, 19 Oct 2007 16:05:18 +0200
From: Adrian Bunk <bunk@...nel.org>
To: miklos@...redi.hu
Cc: fuse-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: [2.6 patch] fuse_file_alloc(): fix NULL dereferences
This patch fixes obvious NULL dereferences spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@...nel.org>
---
53b7c67ef9b6c26a0c7f554fef43021633a48ab7
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 0fcdba9..535b373 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -55,9 +55,10 @@ struct fuse_file *fuse_file_alloc(void)
if (!ff->reserved_req) {
kfree(ff);
ff = NULL;
+ } else {
+ INIT_LIST_HEAD(&ff->write_entry);
+ atomic_set(&ff->count, 0);
}
- INIT_LIST_HEAD(&ff->write_entry);
- atomic_set(&ff->count, 0);
}
return ff;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists