Skip to content

Commit 0dbe3d4

Browse files
committed
std: fix some memory leaks in traceback code
1 parent ee4d668 commit 0dbe3d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/std/debug.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,7 @@ const LineNumberProgram = struct {
15241524
// TODO the noasyncs here are workarounds
15251525
fn readStringRaw(allocator: *mem.Allocator, in_stream: var) ![]u8 {
15261526
var buf = ArrayList(u8).init(allocator);
1527+
errdefer buf.deinit();
15271528
while (true) {
15281529
const byte = try noasync in_stream.readByte();
15291530
if (byte == 0) break;

0 commit comments

Comments
 (0)