diff --git a/src/box/lua/misc.cc b/src/box/lua/misc.cc index 7b8b9dcadea43c1d17bc9c9a5f4c356af08cde86..79b6cfe3a4f02901859b0143775bc3293c7a63fe 100644 --- a/src/box/lua/misc.cc +++ b/src/box/lua/misc.cc @@ -231,6 +231,12 @@ lbox_tuple_format_new(struct lua_State *L) struct tuple_format *format = tuple_format_new(&tuple_format_runtime->vtab, NULL, NULL, 0, NULL, 0, 0, dict, false, false); + /* + * Since dictionary reference counter is 1 from the + * beginning and after creation of the tuple_format + * increases by one, we must decrease it once. + */ + tuple_dictionary_unref(dict); if (format == NULL) return luaT_error(L); return lbox_push_tuple_format(L, format);