mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 04:18:58 +00:00
runtime: fix small leak in Bun.listen (#24799)
pulled out of https://github.com/oven-sh/bun/pull/21663 Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
This commit is contained in:
@@ -234,6 +234,7 @@ pub fn listen(globalObject: *jsc.JSGlobalObject, opts: JSValue) bun.JSError!JSVa
|
||||
}
|
||||
|
||||
const hostname = bun.handleOom(hostname_or_unix.intoOwnedSlice(bun.default_allocator));
|
||||
errdefer bun.default_allocator.free(hostname);
|
||||
var connection: Listener.UnixOrHost = if (port) |port_| .{
|
||||
.host = .{
|
||||
.host = hostname,
|
||||
|
||||
Reference in New Issue
Block a user