src/hg/lib/chromGraphFactory.c 1.16

1.16 2009/02/10 00:47:47 galt
fixed memory allocation error
Index: src/hg/lib/chromGraphFactory.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/chromGraphFactory.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -B -U 4 -r1.15 -r1.16
--- src/hg/lib/chromGraphFactory.c	12 Jan 2009 22:36:21 -0000	1.15
+++ src/hg/lib/chromGraphFactory.c	10 Feb 2009 00:47:47 -0000	1.16
@@ -670,8 +671,11 @@
     if (report)
 	printf("Loaded %d aliases from %s table as well.<BR>\n", 
 		aliasHash->elCount, aliasTable);
     }
+
+fflush(stdout); // trying to keep browser from timing out
+
 AllocArray(row, colCount);
 Chopper chopper = getChopper(formatType);
 char *line;
 
@@ -705,18 +709,15 @@
 		AllocVar(cg);
 		cg->chrom = pos->chrom;
 		cg->chromStart = pos->pos;
 		cg->val = cppNeedDouble(cpp, row, i);
-		cg->marker = marker;
+		cg->marker = cloneString(marker);
 		slAddHead(&fileEl->cgList, cg);
 		}
 	    }
 	}
-    else
-	{
 	freeMem(marker);
 	}
-    }
 if (report)
     printf("Mapped %d of %d (%3.1f%%) of markers<BR>\n", match, total, 
 	    100.0*match/total);
 }