]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/ceph_test_librgw_file_nfsns: always free allocated memory 16227/head
authorKefu Chai <kchai@redhat.com>
Sat, 8 Jul 2017 12:25:12 +0000 (20:25 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 8 Jul 2017 12:38:59 +0000 (20:38 +0800)
commit8a870858f0bb1170ce6551e5d50f8c8834700236
treefa087e43c2a90c535d1fb56044928dbea22dba2c
parentb56c26e7ba2f92f55a7062a29bf78a868f14af7f
test/ceph_test_librgw_file_nfsns: 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/librgw_file_nfsns.cc