From: Danny Al-Gaaf Date: Mon, 22 Jul 2013 15:19:29 +0000 (+0200) Subject: test_cls_statelog.cc: fix resource leak, delete 'rop' at end of function X-Git-Tag: v0.67-rc3~60^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db2850c5322b2219e016bf949c76195b12c81a04;p=ceph.git test_cls_statelog.cc: fix resource leak, delete 'rop' at end of function CID 1049213 (#3 of 3): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "rop" going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/cls_statelog/test_cls_statelog.cc b/src/test/cls_statelog/test_cls_statelog.cc index 1ea8fefa8e7b..33028f4fbad6 100644 --- a/src/test/cls_statelog/test_cls_statelog.cc +++ b/src/test/cls_statelog/test_cls_statelog.cc @@ -84,6 +84,7 @@ static void get_entries_by_client_id(librados::IoCtx& ioctx, string& oid, cls_statelog_list(*rop, client_id, op_id, empty_str, marker, 0, entries, &marker, &truncated); ASSERT_EQ(0, ioctx.operate(oid, rop, &obl)); ASSERT_EQ(expected, (int)entries.size()); + delete rop; } static void get_all_entries(librados::IoCtx& ioctx, string& oid, list& entries, int expected)