[CP] fix core when create_tg_tenant with no_memory

This commit is contained in:
tushicheng
2023-12-12 03:40:45 +00:00
committed by ob-robot
parent 65eccf7d40
commit db82b0b5cd
2 changed files with 10 additions and 6 deletions

View File

@ -46,8 +46,10 @@ void lib_init_create_func()
{
#define TG_DEF(id, name, type, args...) \
create_funcs_[TGDefIDs::id] = []() { \
auto ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
TG_##type *ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
if (NULL != ret) { \
ret->attr_ = {#name, TGType::type}; \
} \
return ret; \
};
#include "lib/thread/thread_define.h"

View File

@ -37,8 +37,10 @@ void ob_init_create_func()
{
#define TG_DEF(id, name, type, args...) \
lib::create_funcs_[lib::TGDefIDs::id] = []() { \
auto ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
TG_##type *ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
if (NULL != ret) { \
ret->attr_ = {#name, TGType::type}; \
} \
return ret; \
};
#include "share/ob_thread_define.h"