Skip to content

Fixed memory leak in isreadable() policy function (3.27.x)#6032

Open
larsewi wants to merge 2 commits intocfengine:3.27.xfrom
larsewi:memleak-3.27.x
Open

Fixed memory leak in isreadable() policy function (3.27.x)#6032
larsewi wants to merge 2 commits intocfengine:3.27.xfrom
larsewi:memleak-3.27.x

Conversation

@larsewi
Copy link
Contributor

@larsewi larsewi commented Feb 9, 2026

  • Fixed memory leak in isreadable() policy function
  • Fixed NULL pointer dereference in AddSimpleUidItem() and AddSimpleGidItem()

Back ported from #6031

Changelog: Title
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
(cherry picked from commit 4249c19)
…Item()

This was caught by cppcheck. It's actually a false positive, because the
xstrdup branch wouldn't be taken when `uidname == 0`. This change makes
it more explicit.

Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
(cherry picked from commit d8f6a15)
@larsewi
Copy link
Contributor Author

larsewi commented Feb 9, 2026

@cf-bottom Jenkins please :)

@cf-bottom
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants