Skip to content

Fix util/argconfig memory leak#3458

Closed
bellis-ibm wants to merge 2 commits into
linux-nvme:masterfrom
bellis-ibm:fix/argconfig-memory-leak
Closed

Fix util/argconfig memory leak#3458
bellis-ibm wants to merge 2 commits into
linux-nvme:masterfrom
bellis-ibm:fix/argconfig-memory-leak

Conversation

@bellis-ibm

Copy link
Copy Markdown

util/argconfig: fix memory leak on allocation failure

Prevent memory leaks when memory allocation fails during argument
parsing. Certain error paths could return before previously allocated
resources were released, resulting in leaked memory and triggering
static analysis warnings.

root added 2 commits June 15, 2026 19:20
The args array was not freed in error paths.

Add goto cleanup pattern to ensure proper cleanup.

Fixes: scan-build warning 'Memory leak: args'
@bellis-ibm bellis-ibm closed this Jun 19, 2026
@bellis-ibm bellis-ibm deleted the fix/argconfig-memory-leak branch June 19, 2026 20:09
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.

1 participant