Browse Source

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

Wendal Chen 3 years ago
parent
commit
b18a0cab40
1 changed files with 1 additions and 0 deletions
  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;
 }