Skip to content

Commit 2d40ed8

Browse files
committed
Fix memory leak in aligner_align function
1 parent 9383c3f commit 2d40ed8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/edlib/edlibext.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ aligner_align(VALUE self, VALUE query, VALUE target)
429429

430430
char *ccigar = edlibAlignmentToCigar(result.alignment, result.alignmentLength, 1); // EDLIB_CIGAR_EXTENDED
431431
cigar = rb_str_new2(ccigar);
432+
free(ccigar);
432433

433434
VALUE hash = rb_hash_new();
434435
rb_hash_aset(hash, ID2SYM(rb_intern("edit_distance")), edit_distance);

0 commit comments

Comments
 (0)