]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
scratchtool.c: fix resource leak and error handling
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 26 Jun 2014 01:49:22 +0000 (03:49 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 26 Jun 2014 01:49:22 +0000 (03:49 +0200)
commit7f7e56c698529bfd49a990caf1c55dcf651a9493
tree65d7c258600e601d8497f7f8c36a3c66220a3941
parentbdb134607dd11cf112db9caf8dbbdf486a3457e4
scratchtool.c: fix resource leak and error handling

Check the result of rados_ioctx_create()before using io_ctx.
Free io_ctx where needed. Fix messages at the end of testrados().

CID 1219613 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable io_ctx going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/tools/scratchtool.c