Skip to content

Commit

Permalink
Fix memory leak in getChangedRanges()
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Jun 24, 2023
1 parent 5ab61a8 commit 2064711
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ void Tree::GetChangedRanges(const Nan::FunctionCallbackInfo<Value> &info) {
Nan::Set(result, i, RangeToJS(ranges[i]));
}

free(ranges);

info.GetReturnValue().Set(result);
}

Expand Down

0 comments on commit 2064711

Please sign in to comment.