Skip to content

Commit e34e0b4

Browse files
Fixed bug where mutex would not be unlocked (espressif#3837)
Fixed bug where uartResizeRxBuffer() did not unlock mutex if creation of queue failed.
1 parent ef2b545 commit e34e0b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cores/esp32/esp32-hal-uart.c

+1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ size_t uartResizeRxBuffer(uart_t * uart, size_t new_size) {
257257
vQueueDelete(uart->queue);
258258
uart->queue = xQueueCreate(new_size, sizeof(uint8_t));
259259
if(uart->queue == NULL) {
260+
UART_MUTEX_UNLOCK();
260261
return NULL;
261262
}
262263
}

0 commit comments

Comments
 (0)