Skip to content

Commit 6ce630b

Browse files
committed
std: fix some memory leaks in traceback code
1 parent 7219386 commit 6ce630b

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
@@ -1920,6 +1920,7 @@ const LineNumberProgram = struct {
19201920
// TODO the noasyncs here are workarounds
19211921
fn readStringRaw(allocator: *mem.Allocator, in_stream: var) ![]u8 {
19221922
var buf = ArrayList(u8).init(allocator);
1923+
errdefer buf.deinit();
19231924
while (true) {
19241925
const byte = try noasync in_stream.readByte();
19251926
if (byte == 0) break;

0 commit comments

Comments
 (0)