mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
Update dns_resolver.zig
This commit is contained in:
@@ -1370,8 +1370,12 @@ pub const DNSResolver = struct {
|
||||
|
||||
var pending: ?*CAresLookup(cares_type, lookup_name) = key.lookup.head.next;
|
||||
var prev_global = key.lookup.head.globalThis;
|
||||
|
||||
// The callback need not and should not attempt to free the memory
|
||||
// pointed to by hostent; the ares library will free it when the
|
||||
// callback returns.
|
||||
var array = addr.toJSReponse(this.vm.allocator, prev_global, lookup_name);
|
||||
defer addr.deinit();
|
||||
|
||||
array.ensureStillAlive();
|
||||
key.lookup.head.onComplete(array);
|
||||
bun.default_allocator.destroy(key.lookup);
|
||||
|
||||
Reference in New Issue
Block a user