tools/cgget: fix coverity warning about resource leak
Fix two resource leaks reported by Coverity tool:
CID
1488718 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage:
Variable handle going out of scope leaks the storage it points to.
CID
1488723 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage:
Variable dir going out of scope leaks the storage it points to.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit
fea1ab8b45d7bbe708c9fd4e66b4d639fa7aa984)