42131c
diff -up libtirpc-0.2.4/src/getnetconfig.c.orig libtirpc-0.2.4/src/getnetconfig.c
42131c
--- libtirpc-0.2.4/src/getnetconfig.c.orig	2018-12-17 10:42:21.296108473 -0500
42131c
+++ libtirpc-0.2.4/src/getnetconfig.c	2018-12-17 10:51:36.397454242 -0500
42131c
@@ -682,6 +682,7 @@ struct netconfig	*ncp;
42131c
 {
42131c
     struct netconfig	*p;
42131c
     char	*tmp;
42131c
+    char	*t;
42131c
     u_int	i;
42131c
 
42131c
     if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL)
42131c
@@ -701,22 +702,21 @@ struct netconfig	*ncp;
42131c
      */
42131c
     *p = *ncp;
42131c
     p->nc_netid = (char *)strcpy(tmp,ncp->nc_netid);
42131c
-    tmp = strchr(tmp, 0) + 1;
42131c
-    p->nc_protofmly = (char *)strcpy(tmp,ncp->nc_protofmly);
42131c
-    tmp = strchr(tmp, 0) + 1;
42131c
-    p->nc_proto = (char *)strcpy(tmp,ncp->nc_proto);
42131c
-    tmp = strchr(tmp, 0) + 1;
42131c
-    p->nc_device = (char *)strcpy(tmp,ncp->nc_device);
42131c
+    t = strchr(tmp, 0) + 1;
42131c
+    p->nc_protofmly = (char *)strcpy(t,ncp->nc_protofmly);
42131c
+    t = strchr(t, 0) + 1;
42131c
+    p->nc_proto = (char *)strcpy(t,ncp->nc_proto);
42131c
+    t = strchr(t, 0) + 1;
42131c
+    p->nc_device = (char *)strcpy(t,ncp->nc_device);
42131c
     p->nc_lookups = (char **)malloc((size_t)(p->nc_nlookups+1) * sizeof(char *));
42131c
     if (p->nc_lookups == NULL) {
42131c
-	free(p->nc_netid);
42131c
 	free(p);
42131c
 	free(tmp);
42131c
 	return(NULL);
42131c
     }
42131c
     for (i=0; i < p->nc_nlookups; i++) {
42131c
-    	tmp = strchr(tmp, 0) + 1;
42131c
-    	p->nc_lookups[i] = (char *)strcpy(tmp,ncp->nc_lookups[i]);
42131c
+	t = strchr(t, 0) + 1;
42131c
+	p->nc_lookups[i] = (char *)strcpy(t,ncp->nc_lookups[i]);
42131c
     }
42131c
     return(p);
42131c
 }