]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: Close a fd leaked
authorMinwoo Im <minwoo.im@samsung.com>
Wed, 13 Mar 2019 05:08:38 +0000 (14:08 +0900)
committerMinwoo Im <minwoo.im@samsung.com>
Wed, 10 Apr 2019 00:03:08 +0000 (01:03 +0100)
commit2b142c4cc0f8fa399c10974de5f30cab8f02b616
tree15cad579296071e2f5a384797663077c87fffec8
parent2853f90c715ea8f47e9243b6cbd1cd5941049e4b
nvme: Close a fd leaked

"output" file descriptor has not been closed not only when this command
is successfully done, but error occurs in the middle of the procdure.

This patch put "output" open after memory preparation so that we can add
close_output label before free_mem.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
nvme.c