From c433b438f2aa12a30fb118b0e436b217a3ea806f Mon Sep 17 00:00:00 2001 From: Maxim Konovalov Date: Sat, 30 Sep 2006 07:34:20 +0000 Subject: [PATCH] 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 --- usr.sbin/quot/quot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 7ef4ae83bf0..84892b06448 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -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; }