From: Danny Al-Gaaf Date: Thu, 25 Jul 2013 22:27:50 +0000 (+0200) Subject: test_cls_statelog.cc: fix memory leak, delete 'rop' X-Git-Tag: v0.67-rc3~41^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=44f43ff8e9e7937067e3841ee204ec2a76d1c283;p=ceph.git test_cls_statelog.cc: fix memory leak, delete 'rop' CID 1054840 (#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 33028f4fbad6..a1b4cc34efcb 100644 --- a/src/test/cls_statelog/test_cls_statelog.cc +++ b/src/test/cls_statelog/test_cls_statelog.cc @@ -70,6 +70,7 @@ static void get_entries_by_object(librados::IoCtx& ioctx, string& oid, cls_statelog_list(*rop, empty_str, op_id, object, marker, 0, entries, &marker, &truncated); ASSERT_EQ(0, ioctx.operate(oid, rop, &obl)); ASSERT_EQ(expected, (int)entries.size()); + delete rop; } static void get_entries_by_client_id(librados::IoCtx& ioctx, string& oid,