aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/bun/socket.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/bun/socket.zig')
-rw-r--r--src/bun.js/api/bun/socket.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bun.js/api/bun/socket.zig b/src/bun.js/api/bun/socket.zig
index 5da6c1f40..592fd6540 100644
--- a/src/bun.js/api/bun/socket.zig
+++ b/src/bun.js/api/bun/socket.zig
@@ -499,10 +499,10 @@ pub const Listener = struct {
pub fn deinit(this: UnixOrHost) void {
switch (this) {
.unix => |u| {
- bun.default_allocator.destroy(@as([*]u8, @ptrFromInt(@intFromPtr(u.ptr))));
+ bun.default_allocator.free(u);
},
.host => |h| {
- bun.default_allocator.destroy(@as([*]u8, @ptrFromInt(@intFromPtr(h.host.ptr))));
+ bun.default_allocator.free(h.host);
},
}
}
@@ -833,7 +833,7 @@ pub const Listener = struct {
this.connection.deinit();
if (this.protos) |protos| {
this.protos = null;
- bun.default_allocator.destroy(protos);
+ bun.default_allocator.free(protos);
}
bun.default_allocator.destroy(this);
}