Skip to content

Commit

Permalink
aumix: add locking in aumix_source_count() (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored Jun 19, 2024
1 parent 1bf05d8 commit 2df1a81
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 @@ -399,7 +399,11 @@ uint32_t aumix_source_count(const struct aumix *mix)
if (!mix)
return 0;

return list_count(&mix->srcl);
mtx_lock(mix->mutex);
uint32_t count = list_count(&mix->srcl);
mtx_unlock(mix->mutex);

return count;
}


Expand Down

0 comments on commit 2df1a81

Please sign in to comment.