Skip to content

Add missing zmalloc check#684

Merged
guvenc merged 1 commit intomainfrom
fix/nat_malloc_check
Jun 5, 2025
Merged

Add missing zmalloc check#684
guvenc merged 1 commit intomainfrom
fix/nat_malloc_check

Conversation

@PlagueCZ
Copy link
Copy Markdown
Contributor

@PlagueCZ PlagueCZ commented Jun 3, 2025

There was a check missing after allocation.

I also added a "rollback", though in that case I don't think there is any hope for recovery.

The rollback is now also done if cannot be added to a hash table, which actually can easily happen if it gets full, so please check that such rollback actually helps and not makes things worse.

While reading the code I did some simplifications too.

@PlagueCZ PlagueCZ requested a review from a team as a code owner June 3, 2025 22:13
@github-actions github-actions bot added size/S bug Something isn't working labels Jun 3, 2025
@guvenc guvenc linked an issue Jun 4, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@byteocean byteocean left a comment

Choose a reason for hiding this comment

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

thanks for taking care of this rollback. LGTM

Copy link
Copy Markdown
Contributor

@guvenc guvenc left a comment

Choose a reason for hiding this comment

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

LGTM as well.

@guvenc guvenc merged commit ed1eb9b into main Jun 5, 2025
6 checks passed
@guvenc guvenc deleted the fix/nat_malloc_check branch June 5, 2025 18:40
@github-project-automation github-project-automation bot moved this to Done in Roadmap Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking bug Something isn't working size/S

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fix several missing memory frees

4 participants