diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch
index 90a9123f723315e43c1f6710d63b7207b5cb4b75..1964a6a7562fd03f5f3b6fe320de362925592f68 100644
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch
+++ b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch
@@ -2068,7 +2068,7 @@ Index: linux-2.6.16.i686/fs/ext3/mballoc.c
 +		return -EIO;
 +	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->history == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch
index 135262a0ff891b73bb7ee32882f18eb0cbf14719..ad077145da850ad4eedd957b93fce5d8827b95f8 100644
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch
+++ b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch
@@ -2067,7 +2067,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +		return -EIO;
 +	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->history == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch
index 4512098da54c51aa62f2034d345506acc7e26ef4..f80b66e83ed6a75a52bd8f4e8447ead5c442ab19 100644
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch
+++ b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch
@@ -2086,7 +2086,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.c
 +		return -EIO;
 +	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
++	if (s->history == NULL) {
 +		kfree(s);
 +		return -EIO;
 +	}