o Check we have a non-NULL pointer to a super block before dereference it.

PR:		misc/103822
Submitted by:	Dmitry Stefankov
MFC after:	2 weeks
This commit is contained in:
maxim 2006-09-30 07:34:20 +00:00
parent cbd0a8935f
commit 9e9ac4a6cb

View File

@ -121,7 +121,7 @@ get_inode(fd,super,ino)
if (ipbuf) {
free(ipbuf);
ipbuf = 0;
if (super->fs_magic == FS_UFS2_MAGIC) {
if (super != NULL && super->fs_magic == FS_UFS2_MAGIC) {
free(cgp);
cgp = 0;
}