mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
fix memory leak in std.debug.openSelfDebugInfo()
This commit is contained in:
parent
ab48934e9c
commit
2b35615ffb
@ -239,6 +239,7 @@ pub fn openSelfDebugInfo(allocator: &mem.Allocator) !&ElfStackTrace {
|
||||
switch (builtin.object_format) {
|
||||
builtin.ObjectFormat.elf => {
|
||||
const st = try allocator.create(ElfStackTrace);
|
||||
errdefer allocator.destroy(st);
|
||||
*st = ElfStackTrace {
|
||||
.self_exe_file = undefined,
|
||||
.elf = undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user