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: Fix memory leak in the error path of loading savedata. #2424

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Nov 16, 2023

This change is Reviewable

@iphydf iphydf added this to the v0.2.19 milestone Nov 16, 2023
Copy link
Member

@JFreegman JFreegman left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (32041a1) 74.41% compared to head (8235d9b) 74.49%.
Report is 2 commits behind head on master.

❗ Current head 8235d9b differs from pull request most recent head 94cf9d1. Consider uploading reports for the commit 94cf9d1 to get more accurate results

Files Patch % Lines
toxcore/tox.c 16.66% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2424      +/-   ##
==========================================
+ Coverage   74.41%   74.49%   +0.08%     
==========================================
  Files          87       87              
  Lines       26235    26243       +8     
==========================================
+ Hits        19523    19551      +28     
+ Misses       6712     6692      -20     

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

Copy link
Member

@nurupo nurupo left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 2 of 1 approvals obtained

@nurupo
Copy link
Member

nurupo commented Nov 16, 2023

Huh, how did this still use free() when all other parts of the code around it were changed to mem_delete()

@JFreegman
Copy link
Member

Huh, how did this still use free() when all other parts of the code around it were changed to mem_delete()

This is a 2 year old PR. I forgot to incorporate some recent changes into it, such as that, and groupchats.

@nurupo
Copy link
Member

nurupo commented Nov 16, 2023

Was confused how did iphy miss those free()s during his mem refactor, but they are new additions from from a recently merged old PR -- makes sense now.

@iphydf iphydf merged commit 94cf9d1 into TokTok:master Nov 16, 2023
50 checks passed
@iphydf iphydf deleted the fix-memleak branch November 16, 2023 01:45
This pull request was closed.
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