]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.4-13 (r350)
authorHeng Li <lh3@live.co.uk>
Tue, 16 Jun 2009 13:37:01 +0000 (13:37 +0000)
committerHeng Li <lh3@live.co.uk>
Tue, 16 Jun 2009 13:37:01 +0000 (13:37 +0000)
 * fixed a small memory leak in pileup, caused by recent modifications

bam_plcmd.c
bamtk.c

index 43e6cf572c19e5c05c93fe99bd29e10f7825cf30..d18716ff72164ea9d8c9ad63efad9e1b308a28f2 100644 (file)
@@ -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 79685ff0c94cf33ba356419057e571c4fe227767..b5afdf284c67145ef45813540900075f273f8f0b 100644 (file)
--- 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[]);