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

Check pointer values to avoid double-free issues #31

Merged
merged 2 commits into from
May 5, 2017

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented May 5, 2017

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?: 10


Avoid double-free issues by first checking if a pointer can actually be freed. To be able to do this, we set all pointers to NULL after they have been freed to avoid dangling behavior. Although this is the general strategy throughout the code, it was missing here in this rather old part of the entire project.

This template was created based on the work of udemy-dl.

@DL6ER DL6ER added the Bugfix label May 5, 2017
@DL6ER DL6ER merged commit 63e1e45 into development May 5, 2017
@DL6ER DL6ER deleted the fix/setupVars_double_Free branch May 5, 2017 11:57
DL6ER added a commit that referenced this pull request May 5, 2017
* FTL v2.6.1 (#29) (#30)

* Add .github/PULL_REQUEST_TEMPLATE.md (#24)

* Add PullApprove settings file (copied from core repo) (#23)

* Don't forget to free linebuffer also when not used (#28)

* Check pointer values to avoid double-free issues (#31)
@snoep snoep mentioned this pull request May 20, 2019
3 tasks
DL6ER pushed a commit that referenced this pull request Oct 14, 2019
Forgot to save the cache correctly with two dashes
@jens1205 jens1205 mentioned this pull request Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant