# Fixed a leak in the json parser\. · gitcafe/zig

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

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

Visibility: public

Requested revision: dd4e9fb16b17579de1b54cdea90df82e41a50340

Requested commit: dd4e9fb16b17579de1b54cdea90df82e41a50340

Commit: dd4e9fb16b17579de1b54cdea90df82e41a50340

Tree: ab28bd85d288a7fb71502dc25cda1af07cb8ed75

Author: Sebastian Keller

Committer: Andrew Kelley

## Message

```
Fixed a leak in the json parser.

parseString() created a copy of the string using the wrong allocator.
Instead of using the ArenaAllocator, it was using the allocator passed
into Parser.init(). This lead to a leak as the copied string was not
freed when the ArenaAllocator was deinited.

```

## Parents

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

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