]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_plcmd.c
* samtools-0.1.4-13 (r350)
[samtools.git] / bam_plcmd.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