# stage2: properly free Decl name · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f

Requested commit: 8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f

Commit: 8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f

Tree: 28db2ba140f4017ef0f314d47a52c8dd517301a9

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: properly free Decl name

Two problems solved:

 * The Decl name may be allocated with gpa or it may be a reference to
   the ZIR string table.

 * The main update() function was freeing the ZIR when we still had
   Decl objects referencing it.

```

## Parents

- [474ade88b58b6fd7239049ec445129eabafa3cbd](https://git.cafe/gitcafe/zig/commit/474ade88b58b6fd7239049ec445129eabafa3cbd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/8ab4a003c8f22a3fd8f84bdb2fc27d8c20d3bf2f?format=markdown)
