]> www.infradead.org Git - users/hch/nvme-cli.git/commit
nvme-cli: fw-log: Fix memory leak for JSON.
authorChaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Fri, 24 Feb 2017 02:39:36 +0000 (18:39 -0800)
committerKeith Busch <keith.busch@intel.com>
Fri, 24 Feb 2017 15:18:52 +0000 (10:18 -0500)
commit9d8d7467f2bd44e6b24439697878580f66c83a5d
tree8dfc06f0065a214b32aa368dfe1369f06e3510b9
parent60b4957f2cec914c65339abf20f9c7ba36b33d83
nvme-cli: fw-log: Fix memory leak for JSON.

This patch fixes the following memory leak when fw-log command
executed with JSON option:-
==7822==
==7822== HEAP SUMMARY:
==7822==     in use at exit: 1,104 bytes in 38 blocks
==7822==   total heap usage: 75 allocs, 37 frees, 5,103 bytes allocated
==7822==
==7822== LEAK SUMMARY:
==7822==    definitely lost: 24 bytes in 1 blocks
==7822==    indirectly lost: 1,080 bytes in 37 blocks
==7822==      possibly lost: 0 bytes in 0 blocks
==7822==    still reachable: 0 bytes in 0 blocks
==7822==         suppressed: 0 bytes in 0 blocks

Fix:-
==8436==
==8436== HEAP SUMMARY:
==8436==     in use at exit: 0 bytes in 0 blocks
==8436==   total heap usage: 75 allocs, 75 frees, 5,103 bytes allocated
==8436==

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
nvme-print.c