va_surface: fix potential double use of a buffer
Substracting 1 to refcount first, means it goes back to unused state temporarily. It may be picked by another thread as well before calling atomic_fetch_sub(). In the end we don't need the -1,+1 it's already in the "used once" state (2) after the atomic_compare_exchange() call.
parent
caf41ce2
No related branches found
No related tags found
Please register or sign in to comment