Neil Brown: Fix possible NULL dereference in super_by_fd

Martin F. Krafft madduck at alioth.debian.org
Tue Jun 24 22:01:51 UTC 2008


Module: mdadm
Branch: upstream
Commit: 3b0896f89988923c314cfb07454dde23b1b401fc
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=3b0896f89988923c314cfb07454dde23b1b401fc

Author: Neil Brown <neilb at suse.de>
Date:   Thu May 15 15:50:45 2008 +1000

Fix possible NULL dereference in super_by_fd

---

 util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/util.c b/util.c
index 108f3c1..1ad6fd0 100644
--- a/util.c
+++ b/util.c
@@ -757,7 +757,8 @@ struct supertype *super_by_fd(int fd)
 
 	if (sra)
 		sysfs_free(sra);
-	st->sb = NULL;
+	if (st)
+		st->sb = NULL;
 	return st;
 }
 




More information about the pkg-mdadm-commits mailing list