Skip to content

[autobackport: sssd-2-9] IPA: memory leak fixed#8637

Merged
alexey-tikhonov merged 1 commit intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8632-to-sssd-2-9
Apr 24, 2026
Merged

[autobackport: sssd-2-9] IPA: memory leak fixed#8637
alexey-tikhonov merged 1 commit intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8632-to-sssd-2-9

Conversation

@sssd-bot
Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8632 IPA: memory leak fixed to branch sssd-2-9, created by @alexey-tikhonov.

Please make sure this backport is correct.

Note

The commits were cherry-picked without conflicts.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8632-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8632-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8632-to-sssd-2-9 --force

Original commits
958a186 - IPA: memory leak fixed

Backported commits


Original Pull Request Body

Result allocated by sss_base64_decode() on NULL context was never freed.

@sssd-bot sssd-bot requested review from aplopez and sumit-bose April 24, 2026 10:03
@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label Apr 24, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies src/providers/ipa/ipa_s2n_exop.c to use a specific memory context for base64 decoding and introduces explicit memory cleanup in error handling paths. The review feedback correctly identifies that the newly added deallocation calls for name and values are redundant and would result in double-free errors, as these variables are already managed at the end of the processing loop.

Comment thread src/providers/ipa/ipa_s2n_exop.c
Comment thread src/providers/ipa/ipa_s2n_exop.c
Copy link
Copy Markdown
Contributor

@sumit-bose sumit-bose left a comment

Choose a reason for hiding this comment

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

Hi,

backport and original version match, ACK.

I think Gemini's comments are wrong because it didn't take the return immediately after the free-s into account.

bye,
Sumit

Result allocated by `sss_base64_decode()` on NULL context was
never freed.

Reviewed-by: Alejandro López <allopez@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com>
(cherry picked from commit 958a186)
@sssd-bot
Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-9-x86_64:upstream (success)
🟢 Build / make-distcheck (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-9) (success)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot sssd-bot force-pushed the SSSD-sssd-backport-pr8632-to-sssd-2-9 branch from 05ed94a to 088f9eb Compare April 24, 2026 12:55
@alexey-tikhonov alexey-tikhonov merged commit 392d078 into SSSD:sssd-2-9 Apr 24, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants