Skip to content

cf-check: Fix segfault on missing state directory - #6359

Merged
larsewi merged 1 commit into
cfengine:masterfrom
btriller:cf-check-segfault
Nov 5, 2026
Merged

larsewi merged 1 commit into
cfengine:masterfrom
btriller:cf-check-segfault

Conversation

@btriller

Copy link
Copy Markdown
Contributor

No description provided.

@cf-bottom

Copy link
Copy Markdown

Thanks for submitting a PR! Maybe @larsewi can review this?

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @btriller 🚀 Although it should probably return NULL so that the failure can be detected by the callers.

Comment thread cf-check/utilities.c Resolved

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is good. However, I still think argv_to_lmdb_files should return NULL on failure, so that the call sites can handle it.

The memory leak is preexisting. But, feel free to fix it too, preferably in a separate commit.

Thanks again!

Comment thread cf-check/dump.c Resolved
@larsewi

larsewi commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@btriller this looks good. Can you please squash the three commits?

@larsewi

larsewi commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@larsewi larsewi added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Nov 5, 2026
@larsewi
larsewi merged commit 47cc0c5 into cfengine:master Nov 5, 2026
13 checks passed
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.24.x: #6475

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.27.x: #6474

@larsewi larsewi removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Nov 5, 2026
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.

5 participants