cloudflare / cloudflare/lua-resty-json

jp_create memory leak

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.