Skip to content

Commit 17a5a83

Browse files
authored
alloc
1 parent 9af035e commit 17a5a83

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bwase.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void bwa_refine_gapped(const bntseq_t *bns, int n_seqs, bwa_seq_t *seqs, ubyte_t
288288
{
289289
ubyte_t *pacseq;
290290
int i, j, k;
291-
kstring_t *str;
291+
kstring_t *str = (kstring_t*)calloc(1, sizeof(kstring_t));
292292

293293
if (!_pacseq) {
294294
pacseq = (ubyte_t*)calloc(bns->l_pac/4+1, 1);
@@ -324,7 +324,6 @@ void bwa_refine_gapped(const bntseq_t *bns, int n_seqs, bwa_seq_t *seqs, ubyte_t
324324
if (s->cigar == 0) s->type = BWA_TYPE_NO_MATCH;
325325
}
326326
// generate MD tag
327-
str = (kstring_t*)calloc(1, sizeof(kstring_t));
328327
for (i = 0; i != n_seqs; ++i) {
329328
bwa_seq_t *s = seqs + i;
330329
if (s->type != BWA_TYPE_NO_MATCH) {

0 commit comments

Comments
 (0)