Skip to content

Fix few resource leaks, uninitialized vars, and error paths#850

Merged
jodavies merged 1 commit into
form-dev:masterfrom
magv:cppcheck
Jun 24, 2026
Merged

Fix few resource leaks, uninitialized vars, and error paths#850
jodavies merged 1 commit into
form-dev:masterfrom
magv:cppcheck

Conversation

@magv

@magv magv commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

These small issues are reported by the cppcheck static analyzer; with these changes, cppcheck is happy.

These small issues are reported by the cppcheck static analyzer;
with these changes, cppcheck is happy.
@magv

magv commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

I've also converted some 0 into NULL in the few places I've touched, if you don't mind.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.144% (-0.02%) from 63.164% — magv:cppcheck into form-dev:master

@tueda tueda self-requested a review June 24, 2026 13:12

@tueda tueda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These are indeed improvements. Thanks!

Though it doesn't matter because FORM exits anyway sooner or later in these error paths, it seems that there are more resource leaks around the code you improved. Would you like to address them in this PR as well? Or a separate PR? (Then we'll have another competition in the workshop.)

@magv

magv commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

No, I think I'm satisfied with this one. Other changes will be separate pull requests.

@jodavies jodavies merged commit fffe208 into form-dev:master Jun 24, 2026
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants