BugID:17646749:[utils] fix dead lock when MQTT_DIRECT switched off
@@ -297,7 +297,9 @@ int _count_malloc_internal(const char *f, const int l, OS_malloc_record *os_mall
}
memset(entry, 0, sizeof(calling_stack_t));
- entry->func_name = LITE_strdup(f);
+ entry->func_name = UTILS_malloc(strlen(f) + 1);
+ memset(entry->func_name, 0, strlen(f) + 1);
+ strncpy(entry->func_name, f, strlen(f));
entry->line = l;
list_add(&entry->func_head, &pos->mem_statis.calling_stack.func_head);
}
