]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw/cls_rgw_types.cc: fix RESOURCE_LEAK
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 12 Mar 2015 22:21:54 +0000 (23:21 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 17 Mar 2015 08:19:39 +0000 (09:19 +0100)
Call push_back() for the generated entry object.

Fix for:

CID 1274297 (#1 of 1): Resource leak (RESOURCE_LEAK)
 3. leaked_storage: Variable entry going out of scope leaks
 the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/cls/rgw/cls_rgw_types.cc

index 89c8476d71d29ac21e2d8afe17fd0803e4d5630c..faec1a304012a577324a97acc889fdcad6314bd2 100644 (file)
@@ -263,6 +263,7 @@ void rgw_bucket_olh_log_entry::generate_test_instances(list<rgw_bucket_olh_log_e
   entry->key.name = "key.name";
   entry->key.instance = "key.instance";
   entry->delete_marker = true;
+  o.push_back(entry);
   o.push_back(new rgw_bucket_olh_log_entry);
 }