mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
Fix the primary leak with config
This commit is contained in:
@ -68,15 +68,13 @@ pub const Config = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
||||||
var arena = ArenaAllocator.init(alloc_gpa);
|
|
||||||
errdefer arena.deinit();
|
|
||||||
const alloc = arena.allocator();
|
|
||||||
|
|
||||||
// Build up our basic config
|
// Build up our basic config
|
||||||
var result: Config = .{
|
var result: Config = .{
|
||||||
._arena = arena,
|
._arena = ArenaAllocator.init(alloc_gpa),
|
||||||
.command = "sh",
|
.command = "sh",
|
||||||
};
|
};
|
||||||
|
errdefer result.deinit();
|
||||||
|
const alloc = result._arena.?.allocator();
|
||||||
|
|
||||||
// Add our default keybindings
|
// Add our default keybindings
|
||||||
try result.keybind.set.put(
|
try result.keybind.set.put(
|
||||||
|
Reference in New Issue
Block a user