Skip to content

Commit

Permalink
aur: avoid lock order inversion
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Jan 9, 2024
1 parent 514a0d1 commit 212477a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/aureceiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ int aurecv_debug(struct re_printf *pf, const struct audio_recv *ar)
double bpms;
int err;

if (!ar || mtx_trylock(ar->aubuf_mtx) != thrd_success)
if (!ar)
return 0;

mb = mbuf_alloc(32);
Expand Down Expand Up @@ -776,7 +776,6 @@ int aurecv_debug(struct re_printf *pf, const struct audio_recv *ar)
err = re_hprintf(pf, "%b", mb->buf, mb->pos);
out:
mem_deref(mb);
mtx_unlock(ar->aubuf_mtx);
return err;
}

Expand Down

0 comments on commit 212477a

Please sign in to comment.