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

Fix memory management in RawPacket #1709

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ol-imorozko
Copy link
Contributor

Ensure that the destructor and assignment operator correctly handle the deletion of raw data based on the m_DeleteRawDataAtDestructor flag by using the updated clear() method.

Update comments to reflect these changes.

Closes #1626

@ol-imorozko ol-imorozko requested a review from seladb as a code owner February 7, 2025 10:34
Ensure that the destructor and assignment operator correctly handle the
deletion of raw data based on the m_DeleteRawDataAtDestructor flag by using
the updated clear() method.

Update comments to reflect these changes.
@ol-imorozko ol-imorozko force-pushed the DeleteRawDataAtDestructor branch from f0174b9 to 5f2de4e Compare February 7, 2025 10:38
@ol-imorozko
Copy link
Contributor Author

I accidentally closed #1667 by deleting the head repository. @Dimi1010, could you, please, link #1626 issue again? Thanks!

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.11%. Comparing base (3292f14) to head (5f2de4e).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1709      +/-   ##
==========================================
- Coverage   83.11%   83.11%   -0.01%     
==========================================
  Files         279      279              
  Lines       48399    48391       -8     
  Branches    10237    10303      +66     
==========================================
- Hits        40227    40220       -7     
- Misses       7035     7039       +4     
+ Partials     1137     1132       -5     
Flag Coverage Δ
alpine320 75.08% <100.00%> (+<0.01%) ⬆️
fedora40 75.11% <100.00%> (+0.01%) ⬆️
macos-13 80.60% <100.00%> (+<0.01%) ⬆️
macos-14 80.60% <100.00%> (+<0.01%) ⬆️
macos-15 80.57% <100.00%> (+<0.01%) ⬆️
mingw32 70.80% <75.00%> (-0.05%) ⬇️
mingw64 70.76% <75.00%> (-0.05%) ⬇️
npcap 85.14% <100.00%> (-0.09%) ⬇️
rhel94 74.96% <100.00%> (+<0.01%) ⬆️
ubuntu2004 58.59% <100.00%> (-0.01%) ⬇️
ubuntu2004-zstd 58.71% <100.00%> (+<0.01%) ⬆️
ubuntu2204 74.87% <100.00%> (+<0.01%) ⬆️
ubuntu2204-icpx 61.27% <80.00%> (-0.01%) ⬇️
ubuntu2404 75.11% <100.00%> (+<0.01%) ⬆️
unittest 83.11% <100.00%> (-0.01%) ⬇️
windows-2019 85.24% <100.00%> (-0.01%) ⬇️
windows-2022 85.27% <100.00%> (-0.01%) ⬇️
winpcap 85.24% <100.00%> (+<0.01%) ⬆️
xdp 50.41% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Dimi1010 Dimi1010 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

m_RawData get delete[]d in copy-operator even if m_DeleteRawDataAtDestructor is not set
3 participants