4e8e6d5906e982288f73f2f17096c8031f430741 markd Thu Feb 5 13:41:08 2015 -0800 fixed memory leak in pslPosTarget diff --git src/utils/pslPosTarget/pslPosTarget.c src/utils/pslPosTarget/pslPosTarget.c index 1adbf12..d84f5f8 100644 --- src/utils/pslPosTarget/pslPosTarget.c +++ src/utils/pslPosTarget/pslPosTarget.c @@ -23,29 +23,30 @@ }; void pslPosTarget(char *pslFileName, char *outFileName) /* pslPosTarget - flip psl strands so target is positive. */ { struct lineFile *pslLf = pslFileOpen(pslFileName); FILE *out = mustOpen(outFileName, "w"); struct psl *psl; while ((psl = pslNext(pslLf)) != NULL) { if (psl->strand[1] == '-') pslRc(psl); psl->strand[1] = '\0'; pslTabOut(psl, out); + pslFree(&psl); } lineFileClose(&pslLf); fclose(out); } int main(int argc, char *argv[]) /* Process command line. */ { optionInit(&argc, argv, options); if (argc != 3) usage(); pslPosTarget(argv[1], argv[2]); return 0; }