summaryrefslogtreecommitdiffstats
path: root/src/test/libradosstriper
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2014-06-23 11:20:09 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2014-06-23 11:20:09 +0200
commit8700aa0e6380b533a06d5c098f2fe83db9577ff5 (patch)
treebcc4ba34827e0c56b8e67078b8a11bd86f3a6380 /src/test/libradosstriper
parentMDCache.cc: init 'umaster::ls' with NULL in contructor (diff)
downloadceph-8700aa0e6380b533a06d5c098f2fe83db9577ff5.tar.xz
ceph-8700aa0e6380b533a06d5c098f2fe83db9577ff5.zip
test/libradosstriper/striping.cc: fix potential memory leak
Fix for: [src/test/libradosstriper/striping.cc:138]: (error) Allocation with getObjName, stat doesn't release it Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/test/libradosstriper')
-rw-r--r--src/test/libradosstriper/striping.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/libradosstriper/striping.cc b/src/test/libradosstriper/striping.cc
index c65f0498de5..3533a61fc70 100644
--- a/src/test/libradosstriper/striping.cc
+++ b/src/test/libradosstriper/striping.cc
@@ -135,7 +135,8 @@ protected:
// check we do not have an extra object behind
uint64_t rados_size;
time_t mtime;
- ASSERT_EQ(-ENOENT, ioctx.stat(getObjName(soid, nb_objects), &rados_size, &mtime));
+ std::string oid = getObjName(soid, nb_objects);
+ ASSERT_EQ(-ENOENT, ioctx.stat(oid, &rados_size, &mtime));
}
};