3d8cc972aeac2f853c867a4b4bbbc1b78ae85c7c
kent
  Fri Sep 5 17:04:21 2014 -0700
Adding new pipelineClose() function that combines pipelineWait and pipelineFree and applying it where it makes sense, in some cases fixing non-symptomatic bugs from missing pipelineWaits
diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c
index 4dd7d86..c9227ef 100644
--- src/hg/lib/hgFind.c
+++ src/hg/lib/hgFind.c
@@ -399,31 +399,31 @@
     pl = pipelineOpen(cmds, pipelineRead | pipelineNoAbort, indexFile, NULL);
     lf = pipelineLineFile(pl);
     verbose(3, "\n***Running this fgrep command with pipeline from %s:\n*** %s\n\n",
 	    indexFile, pipelineDesc(pl));
     while (lineFileNextReal(lf, &line))
 	{
 	id = nextWord(&line);
 	rest = skipLeadingSpaces(line);
 	touppers(rest);
 	if (allKeysPrefix(keyWords, keyCount, rest))
 	    {
 	    struct slName *idEl = slNameNew(id);
 	    slAddHead(&idList, idEl);
 	    }
 	}
-    pipelineFree(&pl);  /* Takes care of lf too. */
+    pipelineClose(&pl);  /* Takes care of lf too. */
     freeCmds(cmds, keyCount);
     if (verboseLevel() >= 3)
 	{
 	int count = slCount(idList);
 	verbose(3, "*** Got %d results from %s\n\n", count, indexFile);
 	}
     }
 freeMem(escapedKey);
 return idList;
 }
 
 
 static char *MrnaIDforGeneName(char *db, char *geneName)
 /* return mRNA ID for a gene name */
 {