Commit 5bc7ad1c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Leave async reader callback_cs on calloc error.

parent 2a321ce3
...@@ -287,15 +287,13 @@ static HRESULT async_reader_queue_op(struct async_reader *reader, enum async_op_ ...@@ -287,15 +287,13 @@ static HRESULT async_reader_queue_op(struct async_reader *reader, enum async_op_
{ {
struct async_op *op; struct async_op *op;
EnterCriticalSection(&reader->callback_cs);
if (!(op = calloc(1, sizeof(*op)))) if (!(op = calloc(1, sizeof(*op))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
op->type = type; op->type = type;
op->new_context = context; op->new_context = context;
EnterCriticalSection(&reader->callback_cs);
list_add_tail(&reader->async_ops, &op->entry); list_add_tail(&reader->async_ops, &op->entry);
LeaveCriticalSection(&reader->callback_cs); LeaveCriticalSection(&reader->callback_cs);
WakeConditionVariable(&reader->callback_cv); WakeConditionVariable(&reader->callback_cv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment