--- sendmail-8.9.3/src/util.c.orig	Fri Jan 22 07:18:40 1999
+++ sendmail-8.9.3/src/util.c	Thu Apr 29 02:34:21 1999
@@ -2086,6 +2086,8 @@
 		ProcListVec = npv;
 	}
 	ProcListVec[i].proc_pid = pid;
+	if (ProcListVec[i].proc_task != NULL)
+		free(ProcListVec[i].proc_task);
 	ProcListVec[i].proc_task = newstr(task);
 
 	/* if process adding itself, it's not a child */
@@ -2142,11 +2144,6 @@
 		if (ProcListVec[i].proc_pid == pid)
 		{
 			ProcListVec[i].proc_pid = NO_PID;
-			if (ProcListVec[i].proc_task != NULL)
-			{
-				free(ProcListVec[i].proc_task);
-				ProcListVec[i].proc_task = NULL;
-			}
 			break;
 		}
 	}
@@ -2172,11 +2169,6 @@
 	for (i = 1; i < ProcListSize; i++)
 	{
 		ProcListVec[i].proc_pid = NO_PID;
-		if (ProcListVec[i].proc_task != NULL)
-		{
-			free(ProcListVec[i].proc_task);
-			ProcListVec[i].proc_task = NULL;
-		}
 	}
 	CurChildren = 0;
 }
@@ -2207,11 +2199,6 @@
 					"proc_list_probe: lost pid %d",
 					(int) ProcListVec[i].proc_pid);
 			ProcListVec[i].proc_pid = NO_PID;
-			if (ProcListVec[i].proc_task != NULL)
-			{
-				free(ProcListVec[i].proc_task);
-				ProcListVec[i].proc_task = NULL;
-			}
 			CurChildren--;
 		}
 	}

