Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes memory leak in cbor_bytestring_add_chunk #228

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

James-ZHANG
Copy link
Contributor

PR: Fixes memory leak in cbor_bytestring_add_chunk

Description

The passed chunk is not freed when cbor_bytestring_add_chunk returns false.

Checklist

  • I have read followed CONTRIBUTING.md
    • I have added tests
    • I have updated the documentation
    • I have updated the CHANGELOG
  • Are there any breaking changes? If so, are they documented?
    No
  • Does this PR introduce any platform specific code? If so, is this captured in the description?
    No
  • Security: Does this PR potentially affect security? If so, is this captured in the description?
    No
  • Performance: Does this PR potentially affect performance? If so, is this captured in the description?
    No

@James-ZHANG James-ZHANG force-pushed the fix-memory-leak-in-bytestring-add-chunk branch from c0782c0 to 8cf378c Compare December 22, 2022 00:07
@codecov-commenter
Copy link

Codecov Report

Merging #228 (8cf378c) into master (f8c9891) will decrease coverage by 0.31%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
- Coverage   95.96%   95.65%   -0.32%     
==========================================
  Files          20       20              
  Lines        1538     1543       +5     
==========================================
  Hits         1476     1476              
- Misses         62       67       +5     
Impacted Files Coverage Δ
src/cbor/bytestrings.c 94.64% <50.00%> (-3.44%) ⬇️
src/cbor/internal/builder_callbacks.c 89.28% <50.00%> (-0.41%) ⬇️
src/cbor/streaming.c 98.01% <0.00%> (-1.00%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@PJK
Copy link
Owner

PJK commented Dec 25, 2022

Nice catch, thanks!

Also filed #231 to improve test coverage

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.

3 participants