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 3856aee commit a8a1c9aCopy full SHA for a8a1c9a
src/node_os.cc
@@ -214,6 +214,9 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
214
return;
215
}
216
217
+ auto cleanup =
218
+ OnScopeLeave([&]() { uv_free_interface_addresses(interfaces, count); });
219
+
220
Local<Value> no_scope_id = Integer::New(isolate, -1);
221
LocalVector<Value> result(isolate);
222
result.reserve(count * 7);
@@ -268,7 +271,6 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
268
271
269
272
270
273
- uv_free_interface_addresses(interfaces, count);
274
args.GetReturnValue().Set(Array::New(isolate, result.data(), result.size()));
275
276
0 commit comments