diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2012-10-19 10:38:51 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2012-10-22 09:44:02 -0400 |
commit | 62ee38804c60c5875ce3c78674419ee137deb8db (patch) | |
tree | f2f457245de2c986d067c296f1cae6ca966f6db4 /support/export/export.c | |
parent | 8b15252e1ff23ae93219ca456c6c72ff6bfab1a0 (diff) | |
download | nfs-utils-62ee38804c60c5875ce3c78674419ee137deb8db.tar.gz nfs-utils-62ee38804c60c5875ce3c78674419ee137deb8db.tar.xz nfs-utils-62ee38804c60c5875ce3c78674419ee137deb8db.zip |
mountd: Add exportent_release()
Split out the logic that releases dynamically allocated data in an
exportent. The junction resolution code will invoke this to clean
up the junction exportent once it has been dumped to the kernel.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/export/export.c')
-rw-r--r-- | support/export/export.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/support/export/export.c b/support/export/export.c index 0257903..6b1d045 100644 --- a/support/export/export.c +++ b/support/export/export.c @@ -31,16 +31,21 @@ static nfs_export * export_allowed_internal(const struct addrinfo *ai, const char *path); +void +exportent_release(struct exportent *eep) +{ + xfree(eep->e_squids); + xfree(eep->e_sqgids); + free(eep->e_mountpoint); + free(eep->e_fslocdata); + free(eep->e_uuid); + xfree(eep->e_hostname); +} + static void export_free(nfs_export *exp) { - xfree(exp->m_export.e_squids); - xfree(exp->m_export.e_sqgids); - free(exp->m_export.e_mountpoint); - free(exp->m_export.e_fslocdata); - free(exp->m_export.e_uuid); - - xfree(exp->m_export.e_hostname); + exportent_release(&exp->m_export); xfree(exp); } |