Skip to content

Fix arcdomain memory leak in mlfi_eom (issue #182)#310

Open
thegushi wants to merge 1 commit into
trusteddomainproject:developfrom
thegushi:fix/issue-182-arcdomain-memleak
Open

Fix arcdomain memory leak in mlfi_eom (issue #182)#310
thegushi wants to merge 1 commit into
trusteddomainproject:developfrom
thegushi:fix/issue-182-arcdomain-memleak

Conversation

@thegushi
Copy link
Copy Markdown
Collaborator

Fixes #182.

arcdomain was strdup'd on each iteration of the ARC chain loop but
never freed — it leaked on the continue path when the hash lookup
missed, and again at loop exit when it hit. Free it after the
pthread_rwlock_unlock call, before the eptr NULL check, so it's
released on every iteration regardless of outcome.

Credit to @KIC-8462852 for the original patch.

arcdomain was strdup'd on each loop iteration but never freed, leaking
on both the continue path and at loop exit. Free it after the hash
lookup, before the eptr NULL check.
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