Skip to content

Commit

Permalink
rem: fix coverity defect in destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh committed Dec 8, 2023
1 parent 74dc01d commit 571a8da
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 571a8da

Please sign in to comment.