From: Neil Brown Date: Thu, 15 May 2008 05:50:45 +0000 (+1000) Subject: Fix possible NULL dereference in super_by_fd X-Git-Tag: mdadm-2.6.5~6 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=commitdiff_plain;h=3b0896f89988923c314cfb07454dde23b1b401fc Fix possible NULL dereference in super_by_fd --- diff --git a/util.c b/util.c index 108f3c16..1ad6fd0d 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; }