From dcf3da39741a89592ab508e02b6f9969aa2aa951 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Tue, 16 Jun 2009 13:37:01 +0000 Subject: [PATCH] * samtools-0.1.4-13 (r350) * fixed a small memory leak in pileup, caused by recent modifications --- bam_plcmd.c | 4 +++- bamtk.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bam_plcmd.c b/bam_plcmd.c index 43e6cf5..d18716f 100644 --- a/bam_plcmd.c +++ b/bam_plcmd.c @@ -189,8 +189,10 @@ static int pileup_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *p // when only variant sites are asked for, test if the site is a variant if ((d->format & BAM_PLF_CNS) && (d->format & BAM_PLF_VAR_ONLY)) { if (!(bam_nt16_table[rb] != 15 && cns>>28 != bam_nt16_table[rb])) { // not a SNP - if (!(r && (r->gt == 2 || strcmp(r->s[r->gt], "*")))) // not an indel + if (!(r && (r->gt == 2 || strcmp(r->s[r->gt], "*")))) { // not an indel + if (r) bam_maqindel_ret_destroy(r); return 0; + } } } // print the first 3 columns diff --git a/bamtk.c b/bamtk.c index 79685ff..b5afdf2 100644 --- a/bamtk.c +++ b/bamtk.c @@ -3,7 +3,7 @@ #include "bam.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.1.4-12 (r347)" +#define PACKAGE_VERSION "0.1.4-13 (r350)" #endif int bam_taf2baf(int argc, char *argv[]); -- 2.39.2