hfsplus: fix NULL dereference in hfsplus_lookup()
[muen/linux.git] / fs / hfsplus / dir.c
index c5a70f83dbe7e1d63a8e5211b22bf17710f0df61..f37662675c3a3467e36510d087833236415dbf67 100644 (file)
@@ -77,13 +77,13 @@ again:
                                cpu_to_be32(HFSP_HARDLINK_TYPE) &&
                                entry.file.user_info.fdCreator ==
                                cpu_to_be32(HFSP_HFSPLUS_CREATOR) &&
+                               HFSPLUS_SB(sb)->hidden_dir &&
                                (entry.file.create_date ==
                                        HFSPLUS_I(HFSPLUS_SB(sb)->hidden_dir)->
                                                create_date ||
                                entry.file.create_date ==
                                        HFSPLUS_I(d_inode(sb->s_root))->
-                                               create_date) &&
-                               HFSPLUS_SB(sb)->hidden_dir) {
+                                               create_date)) {
                        struct qstr str;
                        char name[32];