e40121739efc7749753ff78dfc6a861a9acf5c42 angie Mon Mar 14 10:34:34 2011 -0700 Bug #3208 (hg19 HGDP Allele Freq hgc position links are broken):doh, using a *StaticLoad and then immediately doing a sqlFreeResult is a bad idea. No need to scrounge for memory w/StaticLoad in hgc. diff --git src/hg/hgc/hgdpClick.c src/hg/hgc/hgdpClick.c index a354435..b4ac675 100644 --- src/hg/hgc/hgdpClick.c +++ src/hg/hgc/hgdpClick.c @@ -408,33 +408,32 @@ { struct sqlConnection *conn = hAllocConn(database); char query[512]; struct sqlResult *sr; char **row; int start = cartInt(cart, "o"); genericHeader(tdb, item); int hasBin=1; safef(query, sizeof(query), "select * from %s where name = '%s' and chrom = '%s' and chromStart = %d", tdb->table, item, seqName, start); sr = sqlGetResult(conn, query); if ((row = sqlNextRow(sr)) == NULL) errAbort("doHgdpGeo: no match in %s for %s at %s:%d", tdb->table, item, seqName, start); -struct hgdpGeo geo; -hgdpGeoStaticLoad(row+hasBin, &geo); +struct hgdpGeo *geo = hgdpGeoLoad(row+hasBin); sqlFreeResult(&sr); printCustomUrl(tdb, item, TRUE); -bedPrintPos((struct bed *)&geo, 4, tdb); -printf("Ancestral Allele: %c
\n", geo.ancestralAllele); -printf("Derived Allele: %c
\n", geo.derivedAllele); +bedPrintPos((struct bed *)geo, 4, tdb); +printf("Ancestral Allele: %c
\n", geo->ancestralAllele); +printf("Derived Allele: %c
\n", geo->derivedAllele); printOtherSnpMappings(tdb->table, item, start, conn, hasBin); printf("
\n"); printf("
\n"); -hgdpGeoFreqTable(&geo); +hgdpGeoFreqTable(geo); printf("\n"); -hgdpGeoImg(&geo); +hgdpGeoImg(geo); printf("
\n"); printTrackHtml(tdb); hFreeConn(&conn); }