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:
Admar Schoonen 2020-09-30 13:56:41 +02:00 committed by GitHub
parent ef2b54547e
commit e34e0b45de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,6 +257,7 @@ size_t uartResizeRxBuffer(uart_t * uart, size_t new_size) {
vQueueDelete(uart->queue);
uart->queue = xQueueCreate(new_size, sizeof(uint8_t));
if(uart->queue == NULL) {
UART_MUTEX_UNLOCK();
return NULL;
}
}