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 code scanning alert no. 96: Potential use after free #1

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

SashaXser
Copy link
Owner

Fixes https://github.com/SashaXser/Vanilla-Conquer/security/code-scanning/96

To fix the problem, we need to ensure that no access to the object occurs after it has been deleted. One way to achieve this is to return immediately after the delete this statement to prevent any further execution of code that might access the deleted object. This approach maintains the existing functionality while ensuring that the object is not accessed after it has been freed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@SashaXser SashaXser marked this pull request as ready for review November 5, 2024 17:41
@SashaXser SashaXser merged commit ed71fca into vanilla Nov 5, 2024
34 of 36 checks passed
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.

1 participant