Skip to content

Fix memory leak in rdbLoadObject when loading a wrong HFE#2502

Merged
ranshid merged 1 commit into
valkey-io:unstablefrom
enjoy-binbin:fix_memory_leak
Aug 18, 2025
Merged

Fix memory leak in rdbLoadObject when loading a wrong HFE#2502
ranshid merged 1 commit into
valkey-io:unstablefrom
enjoy-binbin:fix_memory_leak

Conversation

@enjoy-binbin

Copy link
Copy Markdown
Member

There are memory leaks when we return NULL.

There are memory leaks when we return NULL.

Signed-off-by: Binbin <binloveplay1314@qq.com>
@enjoy-binbin enjoy-binbin requested a review from ranshid August 18, 2025 02:43
Comment thread src/rdb.c
@codecov

codecov Bot commented Aug 18, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.02%. Comparing base (f36cc20) to head (71fab97).
⚠️ Report is 3 commits behind head on unstable.

Files with missing lines Patch % Lines
src/rdb.c 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #2502   +/-   ##
=========================================
  Coverage     72.01%   72.02%           
=========================================
  Files           126      126           
  Lines         70448    70452    +4     
=========================================
+ Hits          50734    50740    +6     
+ Misses        19714    19712    -2     
Files with missing lines Coverage Δ
src/rdb.c 76.94% <20.00%> (-0.10%) ⬇️

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ranshid ranshid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thank you!

@ranshid ranshid merged commit 4a12021 into valkey-io:unstable Aug 18, 2025
52 checks passed
@enjoy-binbin enjoy-binbin deleted the fix_memory_leak branch August 18, 2025 06:22
allenss-amazon pushed a commit to allenss-amazon/valkey-core that referenced this pull request Aug 19, 2025
…2502)

There are memory leaks when we return NULL.

Signed-off-by: Binbin <binloveplay1314@qq.com>
asagege pushed a commit to asagege/valkey that referenced this pull request Aug 19, 2025
…2502)

There are memory leaks when we return NULL.

Signed-off-by: Binbin <binloveplay1314@qq.com>
rjd15372 pushed a commit to rjd15372/valkey that referenced this pull request Sep 19, 2025
…2502)

There are memory leaks when we return NULL.

Signed-off-by: Binbin <binloveplay1314@qq.com>
rjd15372 pushed a commit that referenced this pull request Sep 23, 2025
There are memory leaks when we return NULL.

Signed-off-by: Binbin <binloveplay1314@qq.com>
hpatro pushed a commit to hpatro/valkey that referenced this pull request Oct 3, 2025
…2502)

There are memory leaks when we return NULL.

Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants