From: Alex Henrie alexhenrie24@gmail.com
--- dlls/dpnet/client.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c index 4af8daf6d3e..c3d25f5ea6b 100644 --- a/dlls/dpnet/client.c +++ b/dlls/dpnet/client.c @@ -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 = malloc(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;
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/dpnet/peer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/dpnet/peer.c b/dlls/dpnet/peer.c index bbcda6a72c2..143be9aa5eb 100644 --- a/dlls/dpnet/peer.c +++ b/dlls/dpnet/peer.c @@ -92,10 +92,10 @@ static ULONG WINAPI IDirectPlay8PeerImpl_Release(IDirectPlay8Peer *iface)
if(!RefCount) { - heap_free(This->username); - heap_free(This->data); + free(This->username); + free(This->data);
- heap_free(This); + free(This); }
return RefCount; @@ -389,12 +389,12 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface,
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; } @@ -402,10 +402,10 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface,
if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_DATA) { - heap_free(This->data); + free(This->data);
This->datasize = pdpnPlayerInfo->dwDataSize; - This->data = heap_alloc(pdpnPlayerInfo->dwDataSize); + This->data = malloc(pdpnPlayerInfo->dwDataSize); if (!This->data) return E_OUTOFMEMORY;
@@ -638,7 +638,7 @@ HRESULT DPNET_CreateDirectPlay8Peer(IClassFactory *iface, IUnknown *pUnkOuter, R IDirectPlay8PeerImpl* Client; HRESULT ret;
- Client = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectPlay8PeerImpl)); + Client = calloc(1, sizeof(IDirectPlay8PeerImpl));
*ppobj = NULL;
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/dpnet/server.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/dpnet/server.c b/dlls/dpnet/server.c index 8a8ed04642d..923d0d5bfa5 100644 --- a/dlls/dpnet/server.c +++ b/dlls/dpnet/server.c @@ -95,9 +95,9 @@ static ULONG WINAPI IDirectPlay8ServerImpl_Release(IDirectPlay8Server *iface)
if (!ref) { - heap_free(This->servername); - heap_free(This->data); - heap_free(This); + free(This->servername); + free(This->data); + free(This); }
return ref; @@ -182,12 +182,12 @@ static HRESULT WINAPI IDirectPlay8ServerImpl_SetServerInfo(IDirectPlay8Server *i
if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_NAME) { - heap_free(This->servername); + free(This->servername); This->servername = NULL;
if(pdpnPlayerInfo->pwszName) { - This->servername = heap_strdupW(pdpnPlayerInfo->pwszName); + This->servername = wcsdup(pdpnPlayerInfo->pwszName); if (!This->servername) return E_OUTOFMEMORY; } @@ -195,7 +195,7 @@ static HRESULT WINAPI IDirectPlay8ServerImpl_SetServerInfo(IDirectPlay8Server *i
if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_DATA) { - heap_free(This->data); + free(This->data); This->data = NULL; This->datasize = 0;
@@ -204,7 +204,7 @@ static HRESULT WINAPI IDirectPlay8ServerImpl_SetServerInfo(IDirectPlay8Server *i
if(pdpnPlayerInfo->dwDataSize && pdpnPlayerInfo->pvData) { - This->data = heap_alloc(pdpnPlayerInfo->dwDataSize); + This->data = malloc(pdpnPlayerInfo->dwDataSize); if (!This->data) return E_OUTOFMEMORY;
@@ -460,7 +460,7 @@ HRESULT DPNET_CreateDirectPlay8Server(IClassFactory *iface, IUnknown *pUnkOuter, if(pUnkOuter) return CLASS_E_NOAGGREGATION;
- server = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectPlay8ServerImpl)); + server = calloc(1, sizeof(IDirectPlay8ServerImpl)); if (!server) return E_OUTOFMEMORY;
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/dpnet/dpnet_private.h | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index 9458a5123aa..2e36b9ffeee 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -21,7 +21,6 @@ #ifndef __WINE_DPNET_PRIVATE_H #define __WINE_DPNET_PRIVATE_H
-#include "wine/heap.h" #include <wine/list.h> #include "winsock2.h"
@@ -150,12 +149,4 @@ typedef struct { #define FE(x) { x, #x } #define GE(x) { &x, #x }
-static inline WCHAR *heap_strdupW( const WCHAR *src ) -{ - WCHAR *dst; - if (!src) return NULL; - if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src ); - return dst; -} - #endif
This merge request was approved by Alistair Leslie-Hughes.