fix(nimble): Handle missing free in application

pull/13550/head
Rahul Tank 2024-03-27 19:17:58 +05:30
rodzic 2a65cb1b50
commit eafad32dc6
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -355,7 +355,7 @@ void ble_server_uart_task(void *pvParameters)
//Waiting for UART event.
if (xQueueReceive(spp_common_uart_queue, (void * )&event, (TickType_t)portMAX_DELAY)) {
switch (event.type) {
//Event of UART receving data
//Event of UART receiving data
case UART_DATA:
if (event.size) {
uint8_t *ntf;
@ -367,7 +367,7 @@ void ble_server_uart_task(void *pvParameters)
/* Check if client has subscribed to notifications */
if (conn_handle_subs[i]) {
struct os_mbuf *txom;
txom = ble_hs_mbuf_from_flat(ntf, sizeof(ntf));
txom = ble_hs_mbuf_from_flat(ntf, event.size);
rc = ble_gatts_notify_custom(i, ble_spp_svc_gatt_read_val_handle,
txom);
if (rc == 0) {
@ -377,6 +377,8 @@ void ble_server_uart_task(void *pvParameters)
}
}
}
free(ntf);
}
break;
default: