]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
libradosstriper/striping.cc: fix strdup memory leaks
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 27 Oct 2014 17:08:13 +0000 (18:08 +0100)
committerSage Weil <sage@redhat.com>
Mon, 27 Oct 2014 19:44:26 +0000 (12:44 -0700)
commitc92d47e5c22f2333e0543fedca141b2b606024b0
tree01fffb89cd1759761b03459aec91614e01b4e939
parentbe674c5579cf97e6179aefadd45de754cd490c7e
libradosstriper/striping.cc: fix strdup memory leaks

Fix memory leak caused by using std::string to hold result
of strdup call returned from getObjName().

Fix for Coverity issues:

CID 1221525 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Failing to save or free storage allocated by
 this->getObjName(soid, 0UL) leaks it.

CID 1221526 (1-3 of 3): Resource leak (RESOURCE_LEAK)
 leaked_storage: Failing to save or free storage allocated by
 this->getObjName(soid, *) leaks it.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/libradosstriper/striping.cc