Explorar o código

fix: nimble接收ble数据时,有内存泄漏问题

Wendal Chen %!s(int64=3) %!d(string=hai) anos
pai
achega
b18a0cab40
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      app/port/luat_ble_server_api.c

+ 1 - 0
app/port/luat_ble_server_api.c

@@ -185,6 +185,7 @@ static int l_ble_chr_write_cb(lua_State* L, void* ptr) {
         lua_pushlstring(L, wmsg->buff, wmsg->len);
         lua_call(L, 3, 0);
     }
+    luat_heap_free(wmsg);
     return 0;
 }