0894a7b7b123ba04bc474582e17b8af408cbb1af
angie
  Mon Mar 26 11:40:05 2018 -0700
gp was freed -- but it is used later during the draw stage for baseColoring, so don't free it here.

diff --git src/hg/hgTracks/gencodeTracks.c src/hg/hgTracks/gencodeTracks.c
index 6a447ff..eb03734 100644
--- src/hg/hgTracks/gencodeTracks.c
+++ src/hg/hgTracks/gencodeTracks.c
@@ -526,31 +526,30 @@
 if (enabledLabels & ITEM_LABEL_TRANSCRIPT_ID)
     concatItemName(name, sizeof(name), gp->name);
 return cloneString(name);
 }
 
 static struct linkedFeatures *loadGencodeTranscript(struct track *tg, struct gencodeQuery *gencodeQuery, char **row,
                                                     unsigned enabledLabels, struct hash *highlightIds, unsigned highlightColor)
 /* load one genePred record into a linkedFeatures object */
 {
 struct genePred *gp = gencodeQueryGenePred(gencodeQuery, row);
 struct wgEncodeGencodeAttrs *attrs = gencodeQueryAttrs(gencodeQuery, row);  // maybe NULL
 struct linkedFeatures *lf = linkedFeaturesFromGenePred(tg, gp, TRUE);
 if (highlightIds != NULL)
     highlightByGetColor(gp, highlightIds, highlightColor, lf);
 lf->extra = getTranscriptLabel(enabledLabels, gp, attrs);
-genePredFree(&gp);
 wgEncodeGencodeAttrsFree(&attrs);
 return lf;
 }
 
 static void loadGencodeTrack(struct track *tg)
 /* Load genePreds in window info linked feature, with filtering, etc. */
 {
 struct sqlConnection *conn = hAllocConn(database);
 unsigned enabledLabels = getEnabledLabels(tg);
 boolean needAttrs = (enabledLabels & ITEM_LABEL_GENE_ID) != 0;  // only for certain labels
 struct hash *highlightIds = NULL;
 if (anyFilterBy(tg, highlightBySetGet))
     highlightIds = loadHighlightIds(conn, tg);
 struct gencodeQuery *gencodeQuery = geneQueryConstruct(tg, needAttrs);
 struct sqlResult *sr = executeQuery(conn, gencodeQuery);