修复蓝牙段错误

This commit is contained in:
shaozhimin 2024-05-23 20:28:31 +08:00
parent 78590fc1ba
commit c1286a7553
1 changed files with 1 additions and 1 deletions

View File

@ -672,7 +672,7 @@ char** kdk_bluetooth_get_device_name(int id)
if (!tmp) if (!tmp)
goto err_out; goto err_out;
con_name = tmp; con_name = tmp;
con_name[num] = (char *)calloc(1, sizeof(result)); con_name[num] = (char *)calloc(1, strlen(result) + 1);
if (!con_name[num]) if (!con_name[num])
{ {
free(tmp); free(tmp);