Skip to content

Commit ba57404

Browse files
authored
Revert "Fixed runtime crash (#58)"
This reverts commit c2bd952.
1 parent c2bd952 commit ba57404

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/expand.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ void ExpandAddress(const Nan::FunctionCallbackInfo<v8::Value>& info) {
120120
for (i = 0; i < num_expansions; i++) {
121121
v8::Local<v8::String> e = Nan::New(expansions[i]).ToLocalChecked();
122122
ret->Set(context, i, e);
123+
free(expansions[i]);
123124
}
124-
125-
// Free expansions
126-
libpostal_expansion_array_destroy(expansions, num_expansions);
125+
free(expansions);
127126

128127
info.GetReturnValue().Set(ret);
129128
}

0 commit comments

Comments
 (0)