Fix possible NULL dereference in super_by_fd

This commit is contained in:
Neil Brown 2008-05-15 15:50:45 +10:00
parent ddd1a49251
commit 3b0896f899
1 changed files with 2 additions and 1 deletions

3
util.c
View File

@ -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;
}