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
e8b8a80b
Commit
e8b8a80b
authored
Aug 21, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Aug 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activeds: Use CRT allocation functions.
parent
e09dde5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
19 deletions
+9
-19
activeds_main.c
dlls/activeds/activeds_main.c
+5
-14
pathname.c
dlls/activeds/pathname.c
+4
-5
No files found.
dlls/activeds/activeds_main.c
View file @
e8b8a80b
...
...
@@ -233,7 +233,7 @@ HRESULT WINAPI ADsGetLastError(LPDWORD perror, LPWSTR errorbuf, DWORD errorbufle
*/
LPVOID
WINAPI
AllocADsMem
(
DWORD
cb
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
cb
);
return
malloc
(
cb
);
}
/*****************************************************
...
...
@@ -241,7 +241,8 @@ LPVOID WINAPI AllocADsMem(DWORD cb)
*/
BOOL
WINAPI
FreeADsMem
(
LPVOID
pMem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
pMem
);
free
(
pMem
);
return
TRUE
;
}
/*****************************************************
...
...
@@ -249,7 +250,7 @@ BOOL WINAPI FreeADsMem(LPVOID pMem)
*/
LPVOID
WINAPI
ReallocADsMem
(
LPVOID
pOldMem
,
DWORD
cbOld
,
DWORD
cbNew
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
pOldMem
,
cbNew
);
return
realloc
(
pOldMem
,
cbNew
);
}
/*****************************************************
...
...
@@ -257,18 +258,8 @@ LPVOID WINAPI ReallocADsMem(LPVOID pOldMem, DWORD cbOld, DWORD cbNew)
*/
LPWSTR
WINAPI
AllocADsStr
(
LPWSTR
pStr
)
{
LPWSTR
ret
;
SIZE_T
len
;
TRACE
(
"(%p)
\n
"
,
pStr
);
if
(
!
pStr
)
return
NULL
;
len
=
(
wcslen
(
pStr
)
+
1
)
*
sizeof
(
WCHAR
);
ret
=
AllocADsMem
(
len
);
if
(
ret
)
memcpy
(
ret
,
pStr
,
len
);
return
ret
;
return
wcsdup
(
pStr
);
}
/*****************************************************
...
...
dlls/activeds/pathname.c
View file @
e8b8a80b
...
...
@@ -28,7 +28,6 @@
#include "iads.h"
#include "adserr.h"
#include "wine/heap.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
activeds
);
...
...
@@ -84,7 +83,7 @@ static ULONG WINAPI path_Release(IADsPathname *iface)
SysFreeString
(
path
->
provider
);
SysFreeString
(
path
->
server
);
SysFreeString
(
path
->
dn
);
heap_
free
(
path
);
free
(
path
);
}
return
ref
;
...
...
@@ -416,7 +415,7 @@ static HRESULT Pathname_create(REFIID riid, void **obj)
Pathname
*
path
;
HRESULT
hr
;
path
=
heap_
alloc
(
sizeof
(
*
path
));
path
=
m
alloc
(
sizeof
(
*
path
));
if
(
!
path
)
return
E_OUTOFMEMORY
;
path
->
IADsPathname_iface
.
lpVtbl
=
&
IADsPathname_vtbl
;
...
...
@@ -489,7 +488,7 @@ static ULONG WINAPI factory_Release(IClassFactory *iface)
TRACE
(
"(%p) ref %lu
\n
"
,
iface
,
ref
);
if
(
!
ref
)
heap_
free
(
factory
);
free
(
factory
);
return
ref
;
}
...
...
@@ -528,7 +527,7 @@ static HRESULT factory_constructor(const struct class_info *info, REFIID riid, v
class_factory
*
factory
;
HRESULT
hr
;
factory
=
heap_
alloc
(
sizeof
(
*
factory
));
factory
=
m
alloc
(
sizeof
(
*
factory
));
if
(
!
factory
)
return
E_OUTOFMEMORY
;
factory
->
IClassFactory_iface
.
lpVtbl
=
&
factory_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