Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
test/libradosstriper/striping.cc: fix potential memory leak
Browse files Browse the repository at this point in the history
Fix for:
[src/test/libradosstriper/striping.cc:138]: (error) Allocation with
 getObjName, stat doesn't release it

Signed-off-by: Danny Al-Gaaf <[email protected]>
  • Loading branch information
dalgaaf committed Jun 23, 2014
1 parent 2a8c1e2 commit 8700aa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/libradosstriper/striping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ class StriperTestRT : public StriperTestParam {
// 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));
}
};

Expand Down

0 comments on commit 8700aa0

Please sign in to comment.