X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=bam_index.c;h=f60a6f874b106f03c655d1207dddf21c4df7fc48;hp=1ad2e93e5051972b084513d5d7391c45c6cf7bf2;hb=6a0c6f060a60789b48e10a72b1381f6e54599302;hpb=e3b3a0177339fb8c099346986e965e3bd5b85999 diff --git a/bam_index.c b/bam_index.c index 1ad2e93..f60a6f8 100644 --- a/bam_index.c +++ b/bam_index.c @@ -608,6 +608,9 @@ bam_iter_t bam_iter_query(const bam_index_t *idx, int tid, int beg, int end) } } free(bins); + if (n_off == 0) { + free(off); return iter; + } { bam1_t *b = (bam1_t*)calloc(1, sizeof(bam1_t)); int l;