f180c4e580841601ab845cff185e8f8db5569552
braney
  Tue Aug 21 16:50:02 2018 -0700
fix bamToPsl to free memory and get bamSplitOnChrom to build

diff --git src/utils/bamToPsl/bamToPsl.c src/utils/bamToPsl/bamToPsl.c
index f0f64d1..fa9c96e 100644
--- src/utils/bamToPsl/bamToPsl.c
+++ src/utils/bamToPsl/bamToPsl.c
@@ -102,30 +102,31 @@
     {
     if (sam_read1(in, head, &one) < 0)
 	{
 	break;
 	}
     struct psl *psl = bamToPslUnscored(&one, head);
     if (psl != NULL)
        {
        if (chromAlias)
            {
            struct hashEl *hel = NULL;
            if ((hel = hashLookup(chromAlias, psl->tName)) != NULL)
               psl->tName = cloneString((char *)hel->val); /* memory leak */
            }
         pslTabOut(psl, f);  /* no free of this psl data, memory leak */
+        pslFree(&psl);
     }
     ++processCount;
     if (dots)
        if (0 == processCount % dots)
           verbose(1,".");
     if (faF != NULL)
         {
 	char *dna = bamGetQuerySequence(&one, TRUE);
 	char *qName = bam1_qname(&one);
         if (allowDups)
 	    faWriteNext(faF, qName, dna, strlen(dna));
         else
             {
             struct hashEl *hel = NULL;
             if ((hel = hashLookup(fastaSums, qName)) == NULL) // first seen