Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a407ba9f
Commit
a407ba9f
authored
Nov 16, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Use standard C functions for memory allocation in client.c.
parent
41f456f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
client.c
dlls/dpnet/client.c
+10
-10
No files found.
dlls/dpnet/client.c
View file @
a407ba9f
...
...
@@ -87,9 +87,9 @@ static ULONG WINAPI IDirectPlay8ClientImpl_Release(IDirectPlay8Client *iface)
if
(
!
ref
)
{
heap_
free
(
This
->
username
);
heap_
free
(
This
->
data
);
heap_
free
(
This
);
free
(
This
->
username
);
free
(
This
->
data
);
free
(
This
);
}
return
ref
;
}
...
...
@@ -217,12 +217,12 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_SetClientInfo(IDirectPlay8Client *i
if
(
pdpnPlayerInfo
->
dwInfoFlags
&
DPNINFO_NAME
)
{
heap_
free
(
This
->
username
);
free
(
This
->
username
);
This
->
username
=
NULL
;
if
(
pdpnPlayerInfo
->
pwszName
)
{
This
->
username
=
heap_strdupW
(
pdpnPlayerInfo
->
pwszName
);
This
->
username
=
wcsdup
(
pdpnPlayerInfo
->
pwszName
);
if
(
!
This
->
username
)
return
E_OUTOFMEMORY
;
}
...
...
@@ -230,7 +230,7 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_SetClientInfo(IDirectPlay8Client *i
if
(
pdpnPlayerInfo
->
dwInfoFlags
&
DPNINFO_DATA
)
{
heap_
free
(
This
->
data
);
free
(
This
->
data
);
This
->
data
=
NULL
;
This
->
datasize
=
0
;
...
...
@@ -239,7 +239,7 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_SetClientInfo(IDirectPlay8Client *i
if
(
pdpnPlayerInfo
->
dwDataSize
&&
pdpnPlayerInfo
->
pvData
)
{
This
->
data
=
heap_
alloc
(
pdpnPlayerInfo
->
dwDataSize
);
This
->
data
=
m
alloc
(
pdpnPlayerInfo
->
dwDataSize
);
if
(
!
This
->
data
)
return
E_OUTOFMEMORY
;
...
...
@@ -393,7 +393,7 @@ HRESULT DPNET_CreateDirectPlay8Client(IClassFactory *iface, IUnknown *pUnkOuter,
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
client
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlay8ClientImpl
));
client
=
calloc
(
1
,
sizeof
(
IDirectPlay8ClientImpl
));
if
(
!
client
)
return
E_OUTOFMEMORY
;
...
...
@@ -448,7 +448,7 @@ static ULONG WINAPI lobbyclient_Release(IDirectPlay8LobbyClient *iface)
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
free
(
This
);
}
return
ref
;
...
...
@@ -564,7 +564,7 @@ HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *outer
TRACE
(
"%p (%p, %s, %p)
\n
"
,
iface
,
outer
,
debugstr_guid
(
riid
),
obj
);
client
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
client
));
client
=
calloc
(
1
,
sizeof
(
*
client
));
if
(
!
client
)
{
*
obj
=
NULL
;
...
...
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