Skip to content

Commit

Permalink
Merge pull request #147 from verhovsky/getChangedRanges-mem-leak
Browse files Browse the repository at this point in the history
Fix memory leak in getChangedRanges()
  • Loading branch information
verhovsky authored Jun 25, 2023
2 parents 5ab61a8 + 2064711 commit 3224eef
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 3224eef

Please sign in to comment.