We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba8fbf3 commit 662ef66Copy full SHA for 662ef66
src/node_os.cc
@@ -199,6 +199,10 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
199
return args.GetReturnValue().SetUndefined();
200
}
201
202
+ auto cleanup = OnScopeLeave([&]() {
203
+ uv_free_interface_addresses(interfaces, count);
204
+ });
205
+
206
Local<Value> no_scope_id = Integer::New(isolate, -1);
207
LocalVector<Value> result(isolate);
208
result.reserve(count * 7);
@@ -253,7 +257,6 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
253
257
254
258
255
259
256
- uv_free_interface_addresses(interfaces, count);
260
args.GetReturnValue().Set(Array::New(isolate, result.data(), result.size()));
261
262
0 commit comments