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

Use LIST_FOREACH_SAFE() when deallocating list items. #304

Merged
merged 1 commit into from
May 17, 2023
Merged

Conversation

sdunnagan
Copy link
Contributor

When removing items from a list, LIST_FOREACH() will only remove
the first item. LIST_FOREACH_SAFE() prevents this by saving off a
pointer to the next item before executing the loop.

Signed-off-by: Steve Dunnagan <srdunnagan@gmail.com>
@rhatdan
Copy link
Contributor

rhatdan commented May 17, 2023

LGTM

Copy link
Member

@engelmi engelmi left a comment

Choose a reason for hiding this comment

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

LGTM

@engelmi engelmi merged commit 801e96a into main May 17, 2023
@engelmi engelmi deleted the jobs-cleanup branch May 17, 2023 14:20
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