Skip to content

Commit b4cfe73

Browse files
committed
cls/rgw/cls_rgw_types.cc: fix RESOURCE_LEAK
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 <[email protected]>
1 parent d871889 commit b4cfe73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cls/rgw/cls_rgw_types.cc

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ void rgw_bucket_olh_log_entry::generate_test_instances(list<rgw_bucket_olh_log_e
263263
entry->key.name = "key.name";
264264
entry->key.instance = "key.instance";
265265
entry->delete_marker = true;
266+
o.push_back(entry);
266267
o.push_back(new rgw_bucket_olh_log_entry);
267268
}
268269

0 commit comments

Comments
 (0)