Skip to content

Commit

Permalink
Fix memory leak in aligner_align function
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Sep 5, 2024
1 parent 9383c3f commit 2d40ed8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/edlib/edlibext.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ aligner_align(VALUE self, VALUE query, VALUE target)

char *ccigar = edlibAlignmentToCigar(result.alignment, result.alignmentLength, 1); // EDLIB_CIGAR_EXTENDED
cigar = rb_str_new2(ccigar);
free(ccigar);

VALUE hash = rb_hash_new();
rb_hash_aset(hash, ID2SYM(rb_intern("edit_distance")), edit_distance);
Expand Down

0 comments on commit 2d40ed8

Please sign in to comment.