[autobackport: sssd-2-9] LDAP: free tmp var within the loop#8488
Conversation
There was a problem hiding this comment.
Code Review
This pull request is a backport that aims to reduce memory pressure in sdap_add_incomplete_groups by freeing a temporary variable within the loop. While initializing msg to NULL is a good practice, the added call to talloc_zfree(msg) inside the loop appears to introduce a critical double-free bug, as the memory is likely already managed by a per-iteration talloc context.
inside `sdap_add_incomplete_groups()` to avoid memory pressure / cache trashing if handling large groups set. Reviewed-by: Tomáš Halman <[email protected]> (cherry picked from commit 8c1e20b)
|
The pull request was accepted by @alexey-tikhonov with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
f46e2c3 to
f83ee12
Compare
This is an automatic backport of PR#8484 LDAP: free tmp var within the loop 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
Original commits
8c1e20b - LDAP: free tmp var within the loop
Backported commits
Original Pull Request Body
inside
sdap_add_incomplete_groups()to avoid memory pressure/ cache trashing if handling large groups set.