Skip to content

Commit

Permalink
Revert "Fixed runtime crash (#58)"
Browse files Browse the repository at this point in the history
This reverts commit c2bd952.
  • Loading branch information
missinglink authored Jan 30, 2025
1 parent c2bd952 commit ba57404
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/expand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ void ExpandAddress(const Nan::FunctionCallbackInfo<v8::Value>& info) {
for (i = 0; i < num_expansions; i++) {
v8::Local<v8::String> e = Nan::New(expansions[i]).ToLocalChecked();
ret->Set(context, i, e);
free(expansions[i]);
}

// Free expansions
libpostal_expansion_array_destroy(expansions, num_expansions);
free(expansions);

info.GetReturnValue().Set(ret);
}
Expand Down

0 comments on commit ba57404

Please sign in to comment.