Skip to content

Commit

Permalink
rem: fix coverity detected mutex lock in destructor (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored Dec 8, 2023
1 parent 74dc01d commit f708648
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rem/aumix/aumix.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ static void destructor(void *arg)
{
struct aumix *mix = arg;

if (mix->run) {
mtx_lock(&mix->mutex);
bool run = mix->run;
mtx_unlock(&mix->mutex);

if (run) {

mtx_lock(&mix->mutex);
mix->run = false;
Expand Down

0 comments on commit f708648

Please sign in to comment.