diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-12-30 21:28:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-02 13:16:17 -0700 |
| commit | 73ba6bf30be02d65e19304b0ec45c9a2a495698e (patch) | |
| tree | 02b4df9737a767b929855e27c35b2c62b6c894e9 /src/stage1/codegen.cpp | |
| parent | 208a6c7d6a58c1fc46ed832acaa8a882f1c6a1dd (diff) | |
| download | zig-73ba6bf30be02d65e19304b0ec45c9a2a495698e.tar.gz zig-73ba6bf30be02d65e19304b0ec45c9a2a495698e.zip | |
stage2: fix memory leak of emit_bin.sub_path
Instead of juggling GPA-allocated sub_path (and ultimately dropping the
ball, in this analogy), `Compilation.create` allocates an
already-exactly-correct size `sub_path` that has the digest unpopulated.
This is then overwritten in place as necessary and used as the
`emit_bin.sub_path` value, and no allocations/frees are performed for
this file path.
Diffstat (limited to 'src/stage1/codegen.cpp')
0 files changed, 0 insertions, 0 deletions
