Skip to content

libnvme: examples: free the context in display-columnar - #3920

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
prabhakarpujeri:fix-display-columnar-free
Aug 27, 2026
Merged

libnvme: examples: free the context in display-columnar#3920
igaw merged 1 commit into
linux-nvme:masterfrom
prabhakarpujeri:fix-display-columnar-free

Conversation

@prabhakarpujeri

Copy link
Copy Markdown

Problem

Port of linux-nvme/libnvme#1141. display-columnar builds the topology into the global context but never releases it on exit (every other scanning example calls libnvme_free_global_ctx()). Runtime impact nil, but the example is regularly copied as a starting template and should model complete teardown.

Fix

Call libnvme_free_global_ctx(ctx) before returning from main().

Testing

  • Full meson suite green.

The example builds the scanned topology into the global context but
exits without releasing it; every other scanning example calls
libnvme_free_global_ctx(). The process exits right after, so impact is
nil at runtime, but the example models incomplete teardown for anyone
copying it.

Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
@igaw
igaw force-pushed the fix-display-columnar-free branch from be1f4c0 to 06ccbd7 Compare August 27, 2026 09:31
@igaw

igaw commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

removed the libnvme 1 reference.

Thanks!

@igaw
igaw merged commit 529321a into linux-nvme:master Aug 27, 2026
30 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.

2 participants