src/hg/lib/liftOver.c 1.44
1.44 2009/07/15 04:14:50 markd
don't close files that function didn't open, which lead to double-free crash
Index: src/hg/lib/liftOver.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/liftOver.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -b -B -U 4 -r1.43 -r1.44
--- src/hg/lib/liftOver.c 10 Nov 2008 19:02:03 -0000 1.43
+++ src/hg/lib/liftOver.c 15 Jul 2009 04:14:50 -0000 1.44
@@ -1158,9 +1158,8 @@
start = lineFileNeedNum(lf, words, 1);
end = lineFileNeedNum(lf, words, 2);
fprintf(mapped, "%s:%d-%d\n", chrom, BEDSTART_TO_POSITION(start), end);
}
-carefulClose(&mapped);
lineFileClose(&lf);
lf = lineFileOpen(unmappedBedTn.forCgi, TRUE);
while (lineFileNext(lf, &line, NULL))
@@ -1176,9 +1175,8 @@
fprintf(unmapped, "%s:%d-%d\n", chrom,
BEDSTART_TO_POSITION(start), end);
}
}
-carefulClose(&unmapped);
lineFileClose(&lf);
return ct;
}