Skip to content

Commit 2dcad81

Browse files
authored
Merge pull request ceph#56978 from Svelar/asan_rgw_lua
rgw/rgw_lua_utils: free std::string Reviewed-by: Yuval Lifshitz <[email protected]>
2 parents 04416f4 + 759c961 commit 2dcad81

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rgw/rgw_lua_utils.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,9 @@ template<typename MapType>
292292
typename MapType::iterator* create_iterator_metadata(lua_State* L, const std::string_view name,
293293
const typename MapType::iterator& start_it, const typename MapType::iterator& end_it) {
294294
using Iterator = typename MapType::iterator;
295-
const std::string qualified_name = get_iterator_name(name);
296295
// create metatable for userdata
297296
// metatable is created before the userdata to save on allocation if the metatable already exists
298-
const auto metatable_is_new = luaL_newmetatable(L, qualified_name.c_str());
297+
const auto metatable_is_new = luaL_newmetatable(L, get_iterator_name(name).c_str());
299298
const auto metatable_pos = lua_gettop(L);
300299
int userdata_pos;
301300
Iterator* new_it = nullptr;

0 commit comments

Comments
 (0)