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 41cd6ba commit c7eff61Copy full SHA for c7eff61
src/cares_wrap.cc
@@ -1565,6 +1565,8 @@ Maybe<int> SoaTraits::Parse(QuerySoaWrap* wrap,
1565
1566
if (status != ARES_SUCCESS) return Just<int>(status);
1567
1568
+ auto cleanup = OnScopeLeave([&]() { ares_free_data(soa_out); });
1569
+
1570
Local<Object> soa_record = Object::New(env->isolate());
1571
1572
if (soa_record
@@ -1605,8 +1607,6 @@ Maybe<int> SoaTraits::Parse(QuerySoaWrap* wrap,
1605
1607
return Nothing<int>();
1606
1608
}
1609
- ares_free_data(soa_out);
-
1610
wrap->CallOnComplete(soa_record);
1611
return Just<int>(ARES_SUCCESS);
1612
0 commit comments