Fixed bug where mutex would not be unlocked (#3837)
Fixed bug where uartResizeRxBuffer() did not unlock mutex if creation of queue failed.
This commit is contained in:
parent
ef2b54547e
commit
e34e0b45de
@ -257,6 +257,7 @@ size_t uartResizeRxBuffer(uart_t * uart, size_t new_size) {
|
|||||||
vQueueDelete(uart->queue);
|
vQueueDelete(uart->queue);
|
||||||
uart->queue = xQueueCreate(new_size, sizeof(uint8_t));
|
uart->queue = xQueueCreate(new_size, sizeof(uint8_t));
|
||||||
if(uart->queue == NULL) {
|
if(uart->queue == NULL) {
|
||||||
|
UART_MUTEX_UNLOCK();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user