Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2010 12:10:49 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203866 - head/sys/fs/msdosfs
Message-ID:  <201002141210.o1ECAnZS066056@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Feb 14 12:10:49 2010
New Revision: 203866
URL: http://svn.freebsd.org/changeset/base/203866

Log:
  Invalid filesystem might cause the bp to be never read.
  
  Noted by:	Pedro F. Giffuni <giffunip tutopia com>
  Obtanined from:	NetBSD
  MFC after:	1 week

Modified:
  head/sys/fs/msdosfs/msdosfs_fat.c

Modified: head/sys/fs/msdosfs/msdosfs_fat.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_fat.c	Sun Feb 14 12:08:44 2010	(r203865)
+++ head/sys/fs/msdosfs/msdosfs_fat.c	Sun Feb 14 12:10:49 2010	(r203866)
@@ -944,7 +944,8 @@ fillinusemap(pmp)
 		if (readcn == 0)
 			usemap_free(pmp, cn);
 	}
-	brelse(bp);
+	if (bp != NULL)
+		brelse(bp);
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002141210.o1ECAnZS066056>