Skip to content

Fix issues identified by cppcheck#905

Merged
balos1 merged 6 commits into
developfrom
bugfix/cppcheck-leaks
Apr 13, 2026
Merged

Fix issues identified by cppcheck#905
balos1 merged 6 commits into
developfrom
bugfix/cppcheck-leaks

Conversation

@Steven-Roberts
Copy link
Copy Markdown
Collaborator

cppcheck flagged a few memory leaks in the unlikely case of a malloc failing in a constructor, and codex did a decent job at fixing them. These fixes aren't so important, but they make the cppcheck report shorter so it will be easier to identify more important issues in the future.

@Steven-Roberts Steven-Roberts linked an issue Apr 8, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@drreynolds drreynolds left a comment

Choose a reason for hiding this comment

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

Aside from my one question below, this LGTM

Comment thread src/kinsol/kinsol.c
balos1
balos1 previously approved these changes Apr 8, 2026
Comment thread src/cvodes/cvodea.c Outdated
Comment thread src/idas/idaa.c Outdated
@gardner48
Copy link
Copy Markdown
Member

Also note in the change log / recent changes that potential memory leaks were fixed if a memory allocation fails.

@balos1 balos1 merged commit 494061b into develop Apr 13, 2026
53 checks passed
@balos1 balos1 deleted the bugfix/cppcheck-leaks branch April 13, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usless assigments to argument

4 participants