Repository navigation
[v2.16]core: fix empty array write memory leak - #2960
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v2.16 #2960 +/- ##
==========================================
- Coverage 69.05% 69.00% -0.05%
==========================================
Files 137 137
Lines 34799 34860 +61
==========================================
+ Hits 24030 24055 +25
- Misses 10769 10805 +36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68e9946976
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| req->groups[i].tags[k].t = v_elems[1].t; | ||
| req->groups[i].tags[k].value = v_elems[1].v; | ||
| if (req->groups[i].tags[k].t == NEU_JSON_OBJECT) { | ||
| json_incref(req->groups[i].tags[k].value.val_object); |
There was a problem hiding this comment.
Release retained custom values when gtags decoding aborts
When a write_gtags payload contains a valid object-valued tag followed by a malformed group or tag, this increments the first object's reference count, but the subsequent failure paths in decode_write_gtags_req_json only free the tag arrays. neu_json_decode_write_gtags_req then releases the root JSON object, leaving this extra reference unreachable, so repeated invalid requests leak each object encountered before the error; decrement retained object values during partial-decode cleanup.
Useful? React with 👍 / 👎.
No description provided.