]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
test/libradosstriper: always free allocated memory
authorKefu Chai <kchai@redhat.com>
Sat, 8 Jul 2017 12:24:12 +0000 (20:24 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 8 Jul 2017 12:38:59 +0000 (20:38 +0800)
commitb56c26e7ba2f92f55a7062a29bf78a868f14af7f
treeaf934306a677a9ce63d614beb1f4016541dac3ea
parentc6fdebb4bb248bd96ff3d0419a675ac7cb6fc47b
test/libradosstriper: always free allocated memory

use unique_ptr to manage allocated memory, so we can free it even if the
test fails. this silences the warnings like:

Potential leak of memory pointed to by 'buf2'

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/libradosstriper/striping.cc