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

This patch fixes the following memory leak when smart-log command
executed with JSON option:-
==7725== HEAP SUMMARY:
==7725==     in use at exit: 1,661 bytes in 53 blocks
==7725==   total heap usage: 99 allocs, 46 frees, 6,559 bytes allocated
==7725==
==7725== LEAK SUMMARY:
==7725==    definitely lost: 24 bytes in 1 blocks
==7725==    indirectly lost: 1,637 bytes in 52 blocks
==7725==      possibly lost: 0 bytes in 0 blocks
==7725==    still reachable: 0 bytes in 0 blocks
==7725==         suppressed: 0 bytes in 0 blocks

Fix:-
==8322==
==8322== HEAP SUMMARY:
==8322==     in use at exit: 0 bytes in 0 blocks
==8322==   total heap usage: 99 allocs, 99 frees, 6,559 bytes allocated
==8322==

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