Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3c3e5a7 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Andre Eisenbach
Browse files

Add missing lock protection when freeing RFCOMM port queues

Bug: 63100223
Test: Code compilation
Change-Id: Ibbafb9586e9807688276c9eb2f6399cb3ee487c9
(cherry picked from commit 16f4cf0bb17cee817da11f2775f4a00d290eaba7)
parent b91ed299
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -231,10 +231,13 @@ void port_release_port(tPORT* p_port) {
    }

    rfc_port_timer_stop(p_port);

    mutex_global_lock();
    fixed_queue_free(p_port->tx.queue, NULL);
    p_port->tx.queue = NULL;
    fixed_queue_free(p_port->rx.queue, NULL);
    p_port->rx.queue = NULL;
    mutex_global_unlock();

    if (p_port->keep_port_handle) {
      RFCOMM_TRACE_DEBUG("%s Re-initialize handle: %d", __func__, p_port->inx);