diff options
author | kib <kib@FreeBSD.org> | 2010-02-14 12:10:49 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-02-14 12:10:49 +0000 |
commit | 3dd6e87cb09dc334c97ca50dd65e567cfe453006 (patch) | |
tree | 8a1cb6e638b53caac14b1d5525c772595d1ef0bb | |
parent | 5a426adc8be2780ce064591192b54820fc4c9dc0 (diff) | |
download | FreeBSD-src-3dd6e87cb09dc334c97ca50dd65e567cfe453006.zip FreeBSD-src-3dd6e87cb09dc334c97ca50dd65e567cfe453006.tar.gz |
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
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index 7fae9c0..76d1527 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -944,7 +944,8 @@ fillinusemap(pmp) if (readcn == 0) usemap_free(pmp, cn); } - brelse(bp); + if (bp != NULL) + brelse(bp); return (0); } |