X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_aux.c;h=4bbf975dbb88559ae4e86f54db9d7af8c320b3b0;hb=0ccd9d36ebf35ce620a8248ecf4336c84065e6c0;hp=8727af0d81473bd986cfe272ce6d0db7d5b54a25;hpb=39c526eac1eaf53890862fcbcbd6db934db7055f;p=samtools.git diff --git a/bam_aux.c b/bam_aux.c index 8727af0..4bbf975 100644 --- a/bam_aux.c +++ b/bam_aux.c @@ -141,8 +141,10 @@ int bam_parse_region(bam_header_t *header, const char *str, int *ref_id, int *be } else s[name_end] = ':', name_end = l; } } else iter = kh_get(s, h, str); - if (iter == kh_end(h)) - free(s); return -1; + if (iter == kh_end(h)) { + free(s); + return -1; + } *ref_id = kh_val(h, iter); // parse the interval if (name_end < l) {