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

Commit fb06d072 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by android-build-merger
Browse files

Merge "Add missing lock protection when freeing RFCOMM port queues" am: ee89e00a

am: 3c0e76c3

Change-Id: I5fca11ed98a3f7b96228a8a207b989be956962ca
parents 58098aa8 3c0e76c3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -229,10 +229,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);