mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix NULL pointers
This commit is contained in:
@@ -55,6 +55,7 @@ static int32_t uart_worker(void* context) {
|
||||
}
|
||||
}
|
||||
|
||||
furi_hal_uart_set_irq_cb(uart->channel, NULL, NULL);
|
||||
furi_stream_buffer_free(uart->rx_stream);
|
||||
|
||||
return 0;
|
||||
@@ -99,7 +100,6 @@ void esp_flasher_uart_free(EspFlasherUart* uart) {
|
||||
furi_thread_join(uart->rx_thread);
|
||||
furi_thread_free(uart->rx_thread);
|
||||
|
||||
furi_hal_uart_set_irq_cb(uart->channel, NULL, NULL);
|
||||
if(uart->channel == FuriHalUartIdLPUART1) {
|
||||
furi_hal_uart_deinit(uart->channel);
|
||||
}
|
||||
|
||||
@@ -99,6 +99,7 @@ static int32_t uart_worker(void* context) {
|
||||
}
|
||||
}
|
||||
|
||||
furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL);
|
||||
furi_stream_buffer_free(uart->rx_stream);
|
||||
|
||||
return 0;
|
||||
@@ -144,8 +145,6 @@ void evil_portal_uart_free(Evil_PortalUart* uart) {
|
||||
furi_thread_join(uart->rx_thread);
|
||||
furi_thread_free(uart->rx_thread);
|
||||
|
||||
furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL);
|
||||
|
||||
if(UART_CH == FuriHalUartIdLPUART1) {
|
||||
furi_hal_uart_deinit(UART_CH);
|
||||
} else {
|
||||
|
||||
@@ -51,6 +51,7 @@ static int32_t uart_worker(void* context) {
|
||||
}
|
||||
}
|
||||
|
||||
furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL);
|
||||
furi_stream_buffer_free(uart->rx_stream);
|
||||
|
||||
return 0;
|
||||
@@ -95,7 +96,6 @@ void uart_terminal_uart_free(UART_TerminalUart* uart) {
|
||||
furi_thread_join(uart->rx_thread);
|
||||
furi_thread_free(uart->rx_thread);
|
||||
|
||||
furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL);
|
||||
if(UART_CH == FuriHalUartIdLPUART1) {
|
||||
furi_hal_uart_deinit(UART_CH);
|
||||
} else {
|
||||
|
||||
@@ -53,6 +53,7 @@ static int32_t uart_worker(void* context) {
|
||||
}
|
||||
}
|
||||
|
||||
furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL);
|
||||
furi_stream_buffer_free(uart->rx_stream);
|
||||
|
||||
return 0;
|
||||
@@ -94,7 +95,6 @@ void wifi_deauther_uart_free(WifideautherUart* uart) {
|
||||
furi_thread_join(uart->rx_thread);
|
||||
furi_thread_free(uart->rx_thread);
|
||||
|
||||
furi_hal_uart_set_irq_cb(UART_CH, NULL, NULL);
|
||||
if(UART_CH == FuriHalUartIdLPUART1) {
|
||||
furi_hal_uart_deinit(UART_CH);
|
||||
} else {
|
||||
|
||||
@@ -51,6 +51,7 @@ static int32_t uart_worker(void* context) {
|
||||
}
|
||||
}
|
||||
|
||||
furi_hal_uart_set_irq_cb(uart->channel, NULL, NULL);
|
||||
furi_stream_buffer_free(uart->rx_stream);
|
||||
|
||||
return 0;
|
||||
@@ -91,7 +92,6 @@ void wifi_marauder_uart_free(WifiMarauderUart* uart) {
|
||||
furi_thread_join(uart->rx_thread);
|
||||
furi_thread_free(uart->rx_thread);
|
||||
|
||||
furi_hal_uart_set_irq_cb(uart->channel, NULL, NULL);
|
||||
if(uart->channel == FuriHalUartIdLPUART1) {
|
||||
furi_hal_uart_deinit(uart->channel);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user