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
a9d3d435
Commit
a9d3d435
authored
May 27, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/classmoniker: Use CRT allocation functions.
parent
d4cb7010
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
classmoniker.c
dlls/ole32/classmoniker.c
+6
-7
No files found.
dlls/ole32/classmoniker.c
View file @
a9d3d435
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
#include "winbase.h"
#include "winbase.h"
#include "winuser.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "ole2.h"
#include "ole2.h"
#include "moniker.h"
#include "moniker.h"
...
@@ -138,8 +137,8 @@ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface)
...
@@ -138,8 +137,8 @@ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface)
if
(
!
ref
)
if
(
!
ref
)
{
{
if
(
moniker
->
pMarshal
)
IUnknown_Release
(
moniker
->
pMarshal
);
if
(
moniker
->
pMarshal
)
IUnknown_Release
(
moniker
->
pMarshal
);
heap_
free
(
moniker
->
data
);
free
(
moniker
->
data
);
heap_
free
(
moniker
);
free
(
moniker
);
}
}
return
ref
;
return
ref
;
...
@@ -187,8 +186,8 @@ static HRESULT WINAPI ClassMoniker_Load(IMoniker *iface, IStream *stream)
...
@@ -187,8 +186,8 @@ static HRESULT WINAPI ClassMoniker_Load(IMoniker *iface, IStream *stream)
if
(
moniker
->
header
.
data_len
)
if
(
moniker
->
header
.
data_len
)
{
{
heap_
free
(
moniker
->
data
);
free
(
moniker
->
data
);
if
(
!
(
moniker
->
data
=
heap_
alloc
(
moniker
->
header
.
data_len
)))
if
(
!
(
moniker
->
data
=
m
alloc
(
moniker
->
header
.
data_len
)))
{
{
WARN
(
"Failed to allocate moniker data of size %lu.
\n
"
,
moniker
->
header
.
data_len
);
WARN
(
"Failed to allocate moniker data of size %lu.
\n
"
,
moniker
->
header
.
data_len
);
moniker
->
header
.
data_len
=
0
;
moniker
->
header
.
data_len
=
0
;
...
@@ -597,7 +596,7 @@ static HRESULT create_class_moniker(const CLSID *clsid, const WCHAR *data,
...
@@ -597,7 +596,7 @@ static HRESULT create_class_moniker(const CLSID *clsid, const WCHAR *data,
{
{
ClassMoniker
*
object
;
ClassMoniker
*
object
;
if
(
!
(
object
=
heap_alloc_zero
(
sizeof
(
*
object
))))
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
object
->
IMoniker_iface
.
lpVtbl
=
&
ClassMonikerVtbl
;
object
->
IMoniker_iface
.
lpVtbl
=
&
ClassMonikerVtbl
;
...
@@ -608,7 +607,7 @@ static HRESULT create_class_moniker(const CLSID *clsid, const WCHAR *data,
...
@@ -608,7 +607,7 @@ static HRESULT create_class_moniker(const CLSID *clsid, const WCHAR *data,
{
{
object
->
header
.
data_len
=
(
data_len
+
1
)
*
sizeof
(
WCHAR
);
object
->
header
.
data_len
=
(
data_len
+
1
)
*
sizeof
(
WCHAR
);
if
(
!
(
object
->
data
=
heap_
alloc
(
object
->
header
.
data_len
)))
if
(
!
(
object
->
data
=
m
alloc
(
object
->
header
.
data_len
)))
{
{
IMoniker_Release
(
&
object
->
IMoniker_iface
);
IMoniker_Release
(
&
object
->
IMoniker_iface
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
...
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