summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-03-02 11:02:59 +0000
committerkib <kib@FreeBSD.org>2010-03-02 11:02:59 +0000
commit7c1461258e5dda5df03edd7f513705fc905b98ab (patch)
tree5eb15b50fed7d3aa26e0a5c6e8e0d81ada04b63c /sys/fs
parentf5bbcec387e488e77450848ba1fa908741b1fb01 (diff)
downloadFreeBSD-src-7c1461258e5dda5df03edd7f513705fc905b98ab.zip
FreeBSD-src-7c1461258e5dda5df03edd7f513705fc905b98ab.tar.gz
Only destroy pm_fatlock on error if it was initialized.
MFC after: 3 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 3cecd73..20a4dbd 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -770,8 +770,8 @@ error_exit:
g_topology_unlock();
PICKUP_GIANT();
}
- lockdestroy(&pmp->pm_fatlock);
if (pmp) {
+ lockdestroy(&pmp->pm_fatlock);
if (pmp->pm_inusemap)
free(pmp->pm_inusemap, M_MSDOSFSFAT);
free(pmp, M_MSDOSFSMNT);
OpenPOWER on IntegriCloud