[2.8] Fix a rare leak in GC - [MOD-11123]#7340
Merged
redisearch-backport-pull-request[bot] merged 1 commit into2.8from Nov 12, 2025
Merged
[2.8] Fix a rare leak in GC - [MOD-11123]#7340redisearch-backport-pull-request[bot] merged 1 commit into2.8from
redisearch-backport-pull-request[bot] merged 1 commit into2.8from
Conversation
fix leak (cherry picked from commit 81036bb)
2 tasks
GuyAv46
approved these changes
Nov 12, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.8 #7340 +/- ##
==========================================
- Coverage 87.48% 87.44% -0.04%
==========================================
Files 203 203
Lines 34784 34782 -2
==========================================
- Hits 30430 30415 -15
- Misses 4354 4367 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #7315 to
2.8.Note
Fixes a leak in numeric GC by freeing
cardValsArron error, transferring ownership correctly, and simplifyingrecvCardvalsassumptions.recvCardvals: allocate target array directly without freeing/NULLing prior value; relies on zero-initialized inputs for ownership safety.recvNumIdx: on error, free inverted index buffers andcardValsArr, then zero the struct.resetCardinality: transfer ownership ofcardValsArrtorange->valuesand set the source pointer toNULL.recvCardvalsandrecvNumIdx.Written by Cursor Bugbot for commit dc68d16. This will update automatically on new commits. Configure here.