X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fexport%2Fclient.c;h=859dcf1771dfdea480106d7b256cb5131d989e97;hp=6a2592808f0a7e7c7b02aef0f394de1a46b474fa;hb=75cbc8d3fc9e7c3750629bd72519770ab58b868f;hpb=7fc6f6c6b68ba7fa1be6de05ce3b9e2d97b82ea4 diff --git a/support/export/client.c b/support/export/client.c index 6a25928..859dcf1 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -52,6 +52,13 @@ init_addrlist(nfs_client *clp, const struct hostent *hp) clp->m_naddr = i; } +static void +client_free(nfs_client *clp) +{ + xfree(clp->m_hostname); + xfree(clp); +} + /* if canonical is set, then we *know* this is already a canonical name * so hostname lookup is avoided. * This is used when reading /proc/fs/nfs/exports @@ -209,8 +216,7 @@ client_freeall(void) head = clientlist + i; while (*head) { *head = (clp = *head)->m_next; - xfree(clp->m_hostname); - xfree(clp); + client_free(clp); } } }