d77deb0a4cf433b8575e2068d8b099c473e6aab9
galt
  Tue Feb 10 12:52:08 2026 -0800
Fixes from automated code review. refs #37087, #37060

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index d3de5b0d025..df3ae8c1131 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -3766,31 +3766,31 @@
 // DONE Jim also suggested that we might want to handle padding right here in this step.
 // After thinking about it, I do not think it would be very hard because we are merging already.
 // Basically, just take the record from the db table row, add padding to start and end,
 // and clip for chromosome size.
 
 // TODO If we keep it at full genome level (instead of single chrom), then there is an apparent
 // sorting issue because although they are sorted on disk, they are usually sorted by chrom alphabetically
 // so that chr11 (not chr2) comes after chr1.  Instead of trying to specify the sort order in the query,
 // which is slow, or trying to read one chrom at a time in the sorted order which is also slow, we can instead
 // just fetch them in their native order, and then create a duplicate array and copy the contents
 // to it in memory, one chunk per chrom, which would be very fast, but temporarily require duplicate vchrom array mem.
 // Not sure what to do about assemblies with many scaffolds.
 //
 // Adding support for extra options from Gencode hg38 so we can filter for
 // comprehensive, splice-variants, non-coding subsets.
-// Added add support for pseudo filter for pseudoGenes, default off.
+// Added support for pseudo filter for pseudoGenes, default off.
 // Added support for Track Sets including new MANE and Id-list filter.
 
 {
 struct sqlConnection *conn = hAllocConn(database);
 virtRegionList = NULL;
 struct sqlResult *sr;
 char **row;
 int rowOffset = 0;
 struct dyString *query = NULL;
 int padding = emPadding;
 if (sameString(virtModeType, "geneMostly"))
     padding = gmPadding;
 
 // knownPseudo Hash
 struct hash *kpHash = NULL;
@@ -3854,30 +3854,31 @@
 if (virtualSingleChrom())
     sqlDyStringPrintf(query, " chrom='%s'", chromName);
 if (virtualSingleChrom() && kgnf)
     sqlDyStringPrintf(query, " and");
 if (kgnf)
     {
     sqlDyStringPrintf(query, " name in (");
     struct slName *id, *list = slNameListFromCommaEscaped(kgnf);
     for (id=list; id; id=id->next)
 	{
         if (id != list)
 	    sqlDyStringPrintf(query, ",");
 	sqlDyStringPrintf(query, "'%s'", trimSpaces(id->name));
 	}
     sqlDyStringPrintf(query, ")");
+    slNameFreeList(&list);
     }
 
 // TODO GALT may have to change this to in-memory sorting?
 // refGene is out of order because of genbank continuous loading
 // also, using where chrom= causes it to use indexes which disturb order returned.
 sqlDyStringPrintf(query, " order by chrom, txStart");
 sr = sqlGetResult(conn, dyStringContents(query));
 dyStringFree(&query);
 
 char chrom[256] = "";
 int start = -1;
 int end = -1;
 char lastChrom[256] = "";
 int lastStart = -1;
 int lastEnd = -1;