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
0d8ebada
Commit
0d8ebada
authored
Mar 31, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comsvcs: Use CRT memory allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dda4b573
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
main.c
dlls/comsvcs/main.c
+11
-13
No files found.
dlls/comsvcs/main.c
View file @
0d8ebada
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
*/
*/
#include "comsvcs_private.h"
#include "comsvcs_private.h"
#include "wine/heap.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "initguid.h"
#include "initguid.h"
#include "comsvcs_classes.h"
#include "comsvcs_classes.h"
...
@@ -109,7 +108,7 @@ static ULONG WINAPI holder_Release(IHolder *iface)
...
@@ -109,7 +108,7 @@ static ULONG WINAPI holder_Release(IHolder *iface)
if
(
!
ref
)
if
(
!
ref
)
{
{
heap_
free
(
This
);
free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -221,7 +220,7 @@ static HRESULT create_holder(IDispenserDriver *driver, IHolder **object)
...
@@ -221,7 +220,7 @@ static HRESULT create_holder(IDispenserDriver *driver, IHolder **object)
TRACE
(
"(%p)
\n
"
,
object
);
TRACE
(
"(%p)
\n
"
,
object
);
hold
=
heap_
alloc
(
sizeof
(
*
hold
));
hold
=
m
alloc
(
sizeof
(
*
hold
));
if
(
!
hold
)
if
(
!
hold
)
{
{
*
object
=
NULL
;
*
object
=
NULL
;
...
@@ -277,7 +276,7 @@ static ULONG WINAPI dismanager_Release(IDispenserManager *iface)
...
@@ -277,7 +276,7 @@ static ULONG WINAPI dismanager_Release(IDispenserManager *iface)
{
{
if
(
This
->
mta_cookie
)
if
(
This
->
mta_cookie
)
CoDecrementMTAUsage
(
This
->
mta_cookie
);
CoDecrementMTAUsage
(
This
->
mta_cookie
);
heap_
free
(
This
);
free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -330,7 +329,7 @@ static HRESULT WINAPI dispenser_manager_cf_CreateInstance(IClassFactory *iface,
...
@@ -330,7 +329,7 @@ static HRESULT WINAPI dispenser_manager_cf_CreateInstance(IClassFactory *iface,
TRACE
(
"(%p %s %p)
\n
"
,
outer
,
debugstr_guid
(
riid
),
object
);
TRACE
(
"(%p %s %p)
\n
"
,
outer
,
debugstr_guid
(
riid
),
object
);
dismanager
=
heap_alloc_zero
(
sizeof
(
*
dismanager
));
dismanager
=
calloc
(
1
,
sizeof
(
*
dismanager
));
if
(
!
dismanager
)
if
(
!
dismanager
)
{
{
*
object
=
NULL
;
*
object
=
NULL
;
...
@@ -443,8 +442,8 @@ static ULONG WINAPI new_moniker_Release(IMoniker* iface)
...
@@ -443,8 +442,8 @@ static ULONG WINAPI new_moniker_Release(IMoniker* iface)
if
(
!
refcount
)
if
(
!
refcount
)
{
{
heap_
free
(
moniker
->
progid
);
free
(
moniker
->
progid
);
heap_
free
(
moniker
);
free
(
moniker
);
}
}
return
refcount
;
return
refcount
;
...
@@ -488,7 +487,7 @@ static HRESULT WINAPI new_moniker_Load(IMoniker *iface, IStream *stream)
...
@@ -488,7 +487,7 @@ static HRESULT WINAPI new_moniker_Load(IMoniker *iface, IStream *stream)
if
(
SUCCEEDED
(
hr
)
&&
progid_len
)
if
(
SUCCEEDED
(
hr
)
&&
progid_len
)
{
{
if
(
!
(
progid
=
heap_
alloc
(
progid_len
)))
if
(
!
(
progid
=
m
alloc
(
progid_len
)))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
hr
=
IStream_Read
(
stream
,
progid
,
progid_len
,
&
len
);
hr
=
IStream_Read
(
stream
,
progid
,
progid_len
,
&
len
);
}
}
...
@@ -500,12 +499,12 @@ static HRESULT WINAPI new_moniker_Load(IMoniker *iface, IStream *stream)
...
@@ -500,12 +499,12 @@ static HRESULT WINAPI new_moniker_Load(IMoniker *iface, IStream *stream)
if
(
SUCCEEDED
(
hr
)
&&
pad
==
0
)
if
(
SUCCEEDED
(
hr
)
&&
pad
==
0
)
{
{
moniker
->
clsid
=
clsid
;
moniker
->
clsid
=
clsid
;
heap_
free
(
moniker
->
progid
);
free
(
moniker
->
progid
);
moniker
->
progid
=
progid
;
moniker
->
progid
=
progid
;
progid
=
NULL
;
progid
=
NULL
;
}
}
heap_
free
(
progid
);
free
(
progid
);
return
hr
;
return
hr
;
}
}
...
@@ -871,7 +870,7 @@ static HRESULT new_moniker_parse_displayname(IBindCtx *pbc, LPOLESTR name, ULONG
...
@@ -871,7 +870,7 @@ static HRESULT new_moniker_parse_displayname(IBindCtx *pbc, LPOLESTR name, ULONG
progid
=
str
;
progid
=
str
;
}
}
moniker
=
heap_alloc_zero
(
sizeof
(
*
moniker
));
moniker
=
calloc
(
1
,
sizeof
(
*
moniker
));
if
(
!
moniker
)
if
(
!
moniker
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -881,12 +880,11 @@ static HRESULT new_moniker_parse_displayname(IBindCtx *pbc, LPOLESTR name, ULONG
...
@@ -881,12 +880,11 @@ static HRESULT new_moniker_parse_displayname(IBindCtx *pbc, LPOLESTR name, ULONG
moniker
->
clsid
=
guid
;
moniker
->
clsid
=
guid
;
if
(
progid
)
if
(
progid
)
{
{
if
(
!
(
moniker
->
progid
=
heap_alloc
((
lstrlenW
(
progid
)
+
1
)
*
sizeof
(
WCHAR
)
)))
if
(
!
(
moniker
->
progid
=
wcsdup
(
progid
)))
{
{
IMoniker_Release
(
&
moniker
->
IMoniker_iface
);
IMoniker_Release
(
&
moniker
->
IMoniker_iface
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
lstrcpyW
(
moniker
->
progid
,
progid
);
}
}
*
ret
=
&
moniker
->
IMoniker_iface
;
*
ret
=
&
moniker
->
IMoniker_iface
;
...
...
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