winegstreamer: Leave async reader callback_cs on calloc error.

This commit is contained in:
Rémi Bernon 2022-08-26 10:53:02 +02:00 committed by Alexandre Julliard
parent 2a321ce324
commit 5bc7ad1c34

View file

@ -287,15 +287,13 @@ static HRESULT async_reader_queue_op(struct async_reader *reader, enum async_op_
{
struct async_op *op;
EnterCriticalSection(&reader->callback_cs);
if (!(op = calloc(1, sizeof(*op))))
return E_OUTOFMEMORY;
op->type = type;
op->new_context = context;
EnterCriticalSection(&reader->callback_cs);
list_add_tail(&reader->async_ops, &op->entry);
LeaveCriticalSection(&reader->callback_cs);
WakeConditionVariable(&reader->callback_cv);