X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fexport%2Fexport.c;h=3e4da699091110645362457b3d2f3e264949233e;hp=ddc8a8482e58b9a33186c454b44b9c528dfbe041;hb=5d954d871fb265af584faef5df6e2e7e6ada7c3b;hpb=9b7cc679c70d00af3f44dc6a8b44a360a2423d64 diff --git a/support/export/export.c b/support/export/export.c index ddc8a84..3e4da69 100644 --- a/support/export/export.c +++ b/support/export/export.c @@ -129,6 +129,10 @@ export_dup(nfs_export *exp, struct hostent *hp) if (exp->m_export.e_hostname) new->m_export.e_hostname = xstrdup(exp->m_export.e_hostname); clp = client_dup(exp->m_client, hp); + if (clp == NULL) { + export_free(new); + return NULL; + } clp->m_count++; new->m_client = clp; new->m_mayexport = exp->m_mayexport;