Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion luat/modules/luat_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ int luat_cbcwait(lua_State *L, uint64_t id, int arg_num) {
static int luat_cbcwait_cb(lua_State *L, void* ptr) {
(void)ptr;
rtos_msg_t* msg = (rtos_msg_t*)lua_topointer(L, -1);
if(lua_getglobal(L, "sys_pub") != LUA_TFUNCTION)
if(lua_getglobal(L, "sys_pub") != LUA_TFUNCTION) {
luat_heap_free(msg->ptr);
return 0;
}
char* topic = (char*)luat_heap_malloc(1 + sizeof(uint64_t));
if (topic == NULL) {
LLOGE("out of memory when malloc topic");
Expand Down