Skip to content

Fixed memory leak in isreadable() policy function (3.24.x)#6033

Merged
larsewi merged 2 commits into
cfengine:3.24.xfrom
larsewi:memleak-3.24.x
Feb 13, 2026
Merged

Fixed memory leak in isreadable() policy function (3.24.x)#6033
larsewi merged 2 commits into
cfengine:3.24.xfrom
larsewi:memleak-3.24.x

Conversation

@larsewi

@larsewi larsewi commented Feb 9, 2026

Copy link
Copy Markdown
Contributor
  • 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

larsewi commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@larsewi larsewi merged commit aae2cca into cfengine:3.24.x Feb 13, 2026
44 of 46 checks passed
@larsewi larsewi deleted the memleak-3.24.x branch April 27, 2026 07:15
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