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
8ef070b6
Commit
8ef070b6
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 peer.c.
parent
a407ba9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
peer.c
dlls/dpnet/peer.c
+8
-8
No files found.
dlls/dpnet/peer.c
View file @
8ef070b6
...
@@ -92,10 +92,10 @@ static ULONG WINAPI IDirectPlay8PeerImpl_Release(IDirectPlay8Peer *iface)
...
@@ -92,10 +92,10 @@ static ULONG WINAPI IDirectPlay8PeerImpl_Release(IDirectPlay8Peer *iface)
if
(
!
RefCount
)
if
(
!
RefCount
)
{
{
heap_
free
(
This
->
username
);
free
(
This
->
username
);
heap_
free
(
This
->
data
);
free
(
This
->
data
);
heap_
free
(
This
);
free
(
This
);
}
}
return
RefCount
;
return
RefCount
;
...
@@ -389,12 +389,12 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface,
...
@@ -389,12 +389,12 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface,
if
(
pdpnPlayerInfo
->
dwInfoFlags
&
DPNINFO_NAME
)
if
(
pdpnPlayerInfo
->
dwInfoFlags
&
DPNINFO_NAME
)
{
{
heap_
free
(
This
->
username
);
free
(
This
->
username
);
This
->
username
=
NULL
;
This
->
username
=
NULL
;
if
(
pdpnPlayerInfo
->
pwszName
)
if
(
pdpnPlayerInfo
->
pwszName
)
{
{
This
->
username
=
heap_strdupW
(
pdpnPlayerInfo
->
pwszName
);
This
->
username
=
wcsdup
(
pdpnPlayerInfo
->
pwszName
);
if
(
!
This
->
username
)
if
(
!
This
->
username
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
...
@@ -402,10 +402,10 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface,
...
@@ -402,10 +402,10 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface,
if
(
pdpnPlayerInfo
->
dwInfoFlags
&
DPNINFO_DATA
)
if
(
pdpnPlayerInfo
->
dwInfoFlags
&
DPNINFO_DATA
)
{
{
heap_
free
(
This
->
data
);
free
(
This
->
data
);
This
->
datasize
=
pdpnPlayerInfo
->
dwDataSize
;
This
->
datasize
=
pdpnPlayerInfo
->
dwDataSize
;
This
->
data
=
heap_
alloc
(
pdpnPlayerInfo
->
dwDataSize
);
This
->
data
=
m
alloc
(
pdpnPlayerInfo
->
dwDataSize
);
if
(
!
This
->
data
)
if
(
!
This
->
data
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -638,7 +638,7 @@ HRESULT DPNET_CreateDirectPlay8Peer(IClassFactory *iface, IUnknown *pUnkOuter, R
...
@@ -638,7 +638,7 @@ HRESULT DPNET_CreateDirectPlay8Peer(IClassFactory *iface, IUnknown *pUnkOuter, R
IDirectPlay8PeerImpl
*
Client
;
IDirectPlay8PeerImpl
*
Client
;
HRESULT
ret
;
HRESULT
ret
;
Client
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlay8PeerImpl
));
Client
=
calloc
(
1
,
sizeof
(
IDirectPlay8PeerImpl
));
*
ppobj
=
NULL
;
*
ppobj
=
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