diff -ur nfs-utils-2.3.1.orig/support/export/client.c nfs-utils-2.3.1.mod/support/export/client.c
--- nfs-utils-2.3.1.orig/support/export/client.c	2017-12-20 18:40:36.000000000 +0300
+++ nfs-utils-2.3.1.mod/support/export/client.c	2019-03-06 16:14:54.974191027 +0300
@@ -309,7 +309,8 @@
 		init_addrlist(clp, ai);
 
 out:
-	freeaddrinfo(ai);
+	if (ai)
+		freeaddrinfo(ai);
 	return clp;
 }
 
diff -ur nfs-utils-2.3.1.orig/utils/mountd/cache.c nfs-utils-2.3.1.mod/utils/mountd/cache.c
--- nfs-utils-2.3.1.orig/utils/mountd/cache.c	2017-12-20 18:40:36.000000000 +0300
+++ nfs-utils-2.3.1.mod/utils/mountd/cache.c	2019-03-06 16:23:28.829378703 +0300
@@ -834,7 +834,8 @@
 out:
 	if (found_path)
 		free(found_path);
-	freeaddrinfo(ai);
+	if (ai)
+		freeaddrinfo(ai);
 	free(dom);
 	xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
 }
@@ -1364,7 +1365,8 @@
 	xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
 	if (dom) free(dom);
 	if (path) free(path);
-	freeaddrinfo(ai);
+	if (ai)
+		freeaddrinfo(ai);
 }
 
 
