cloudflare / cloudflare/lua-resty-json
jp_create memory leak
Open
- Dominant language
- C
- Stars
- 178
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I think found a memory leak in jp_create, the code is hear:
https://github.com/cloudflare/lua-resty-json/blob/547c34da77ab96bcf60a829243179b90b7f30459/parser.c#L290
If mp_create returns null, then jp_create will directly return 0 without free p.
Contributor guide
Assessment
This issue has not been assessed yet.