Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
349b61cc
Commit
349b61cc
authored
Apr 21, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtworkq: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2d229084
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
queue.c
dlls/rtworkq/queue.c
+9
-13
No files found.
dlls/rtworkq/queue.c
View file @
349b61cc
...
...
@@ -24,7 +24,6 @@
#include "initguid.h"
#include "rtworkq.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
...
...
@@ -220,7 +219,7 @@ static HRESULT unlock_user_queue(DWORD queue)
{
if
(
shared_mt_queue
==
queue
)
shared_mt_queue
=
0
;
shutdown_queue
((
struct
queue
*
)
entry
->
obj
);
heap_
free
(
entry
->
obj
);
free
(
entry
->
obj
);
entry
->
obj
=
next_free_user_queue
;
next_free_user_queue
=
entry
;
}
...
...
@@ -555,7 +554,7 @@ static ULONG WINAPI work_item_Release(IUnknown *iface)
if
(
item
->
reply_result
)
IRtwqAsyncResult_Release
(
item
->
reply_result
);
IRtwqAsyncResult_Release
(
item
->
result
);
heap_
free
(
item
);
free
(
item
);
}
return
refcount
;
...
...
@@ -574,7 +573,7 @@ static struct work_item * alloc_work_item(struct queue *queue, LONG priority, IR
DWORD
flags
=
0
,
queue_id
=
0
;
struct
work_item
*
item
;
item
=
heap_alloc_zero
(
sizeof
(
*
item
));
item
=
calloc
(
1
,
sizeof
(
*
item
));
item
->
IUnknown_iface
.
lpVtbl
=
&
work_item_vtbl
;
item
->
result
=
result
;
...
...
@@ -898,8 +897,7 @@ static HRESULT alloc_user_queue(const struct queue_desc *desc, DWORD *queue_id)
if
(
platform_lock
<=
0
)
return
RTWQ_E_SHUTDOWN
;
queue
=
heap_alloc_zero
(
sizeof
(
*
queue
));
if
(
!
queue
)
if
(
!
(
queue
=
calloc
(
1
,
sizeof
(
*
queue
))))
return
E_OUTOFMEMORY
;
init_work_queue
(
desc
,
queue
);
...
...
@@ -914,7 +912,7 @@ static HRESULT alloc_user_queue(const struct queue_desc *desc, DWORD *queue_id)
else
{
LeaveCriticalSection
(
&
queues_section
);
heap_
free
(
queue
);
free
(
queue
);
WARN
(
"Out of user queue handles.
\n
"
);
return
E_OUTOFMEMORY
;
}
...
...
@@ -988,7 +986,7 @@ static ULONG WINAPI async_result_Release(IRtwqAsyncResult *iface)
IUnknown_Release
(
result
->
state
);
if
(
result
->
result
.
hEvent
)
CloseHandle
(
result
->
result
.
hEvent
);
heap_
free
(
result
);
free
(
result
);
RtwqUnlockPlatform
();
}
...
...
@@ -1074,8 +1072,7 @@ static HRESULT create_async_result(IUnknown *object, IRtwqAsyncCallback *callbac
if
(
!
out
)
return
E_INVALIDARG
;
result
=
heap_alloc_zero
(
sizeof
(
*
result
));
if
(
!
result
)
if
(
!
(
result
=
calloc
(
1
,
sizeof
(
*
result
))))
return
E_OUTOFMEMORY
;
RtwqLockPlatform
();
...
...
@@ -1267,7 +1264,7 @@ static ULONG WINAPI periodic_callback_Release(IRtwqAsyncCallback *iface)
TRACE
(
"%p, %u.
\n
"
,
iface
,
refcount
);
if
(
!
refcount
)
heap_
free
(
callback
);
free
(
callback
);
return
refcount
;
}
...
...
@@ -1306,8 +1303,7 @@ static HRESULT create_periodic_callback_obj(RTWQPERIODICCALLBACK callback, IRtwq
{
struct
periodic_callback
*
object
;
object
=
heap_alloc
(
sizeof
(
*
object
));
if
(
!
object
)
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
object
->
IRtwqAsyncCallback_iface
.
lpVtbl
=
&
periodic_callback_vtbl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment