aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-12-30 21:35:24 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-01-02 13:16:17 -0700
commit013c286e432eacbd55a9f842cd277be11f72cc49 (patch)
treeaa4fd9ec6d4d89330717b03a162ba0b36a183e79 /src/Compilation.zig
parent73ba6bf30be02d65e19304b0ec45c9a2a495698e (diff)
downloadzig-013c286e432eacbd55a9f842cd277be11f72cc49.tar.gz
zig-013c286e432eacbd55a9f842cd277be11f72cc49.zip
stage2: fix memory leak in addNonIncrementalStuffToCacheManifest
I accidentally used errdefer instead of defer for the function-local arena.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 4c31f8a998..c17b187f4f 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -2170,7 +2170,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
const target = comp.getTarget();
var arena_allocator = std.heap.ArenaAllocator.init(gpa);
- errdefer arena_allocator.deinit();
+ defer arena_allocator.deinit();
const arena = arena_allocator.allocator();
comptime assert(link_hash_implementation_version == 1);