diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:04:05 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:04:05 -0400 |
commit | a738159df2b97398f960978272944cbdd8f726ef (patch) | |
tree | 20959d5f1d941dd7c755bf9bc8141f20f97249dd /fs/xfs/xfs_mount.c | |
parent | 5e9da7b7a1edfc75a839b0269935393fa347f38b (diff) |
[XFS] don't leak m_fsname/m_rtname/m_logname
Add a helper to free the m_fsname/m_rtname/m_logname allocations and use
it properly for all mount failure cases. Also switch the allocations for
these to kstrdup while we're at it.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31728a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 6c5d1325e7f6..31699b19bb3c 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -146,13 +146,6 @@ xfs_mount_free( | |||
146 | mutex_destroy(&mp->m_growlock); | 146 | mutex_destroy(&mp->m_growlock); |
147 | if (mp->m_quotainfo) | 147 | if (mp->m_quotainfo) |
148 | XFS_QM_DONE(mp); | 148 | XFS_QM_DONE(mp); |
149 | |||
150 | if (mp->m_fsname != NULL) | ||
151 | kmem_free(mp->m_fsname); | ||
152 | if (mp->m_rtname != NULL) | ||
153 | kmem_free(mp->m_rtname); | ||
154 | if (mp->m_logname != NULL) | ||
155 | kmem_free(mp->m_logname); | ||
156 | } | 149 | } |
157 | 150 | ||
158 | /* | 151 | /* |