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
fdbd8cf0
Commit
fdbd8cf0
authored
Nov 06, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Use CRT allocation functions.
parent
0e39cd65
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
shdocvw.h
dlls/shdocvw/shdocvw.h
+0
-1
shdocvw_main.c
dlls/shdocvw/shdocvw_main.c
+8
-8
shlinstobj.c
dlls/shdocvw/shlinstobj.c
+7
-7
No files found.
dlls/shdocvw/shdocvw.h
View file @
fdbd8cf0
...
...
@@ -34,7 +34,6 @@
#include "shlobj.h"
#include "exdisp.h"
#include "wine/heap.h"
#include "wine/list.h"
/**********************************************************************
...
...
dlls/shdocvw/shdocvw_main.c
View file @
fdbd8cf0
...
...
@@ -104,14 +104,14 @@ DWORD WINAPI IEWinMain(LPSTR szCommandLine, int nShowWindow)
ExitProcess
(
1
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szCommandLine
,
-
1
,
NULL
,
0
);
cmdline
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
cmdline
=
malloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
cmdline
)
ExitProcess
(
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szCommandLine
,
-
1
,
cmdline
,
len
);
ret
=
pIEWinMain
(
cmdline
,
nShowWindow
);
heap_
free
(
cmdline
);
free
(
cmdline
);
return
ret
;
}
...
...
@@ -403,13 +403,13 @@ DWORD WINAPI ParseURLFromOutsideSourceA(LPCSTR url, LPSTR out, LPDWORD plen, LPD
if
(
url
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
url
,
-
1
,
NULL
,
0
);
urlW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
urlW
=
malloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
url
,
-
1
,
urlW
,
len
);
}
len
=
ARRAY_SIZE
(
buffer
);
ParseURLFromOutsideSourceW
(
urlW
,
buffer
,
&
len
,
unknown
);
HeapFree
(
GetProcessHeap
(),
0
,
urlW
);
free
(
urlW
);
needed
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
...
...
@@ -460,11 +460,11 @@ DWORD WINAPI SHRestricted2A(DWORD restriction, LPCSTR url, DWORD reserved)
TRACE
(
"(%ld, %s, %ld)
\n
"
,
restriction
,
debugstr_a
(
url
),
reserved
);
if
(
url
)
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
url
,
-
1
,
NULL
,
0
);
urlW
=
heap_
alloc
(
len
*
sizeof
(
WCHAR
));
urlW
=
m
alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
url
,
-
1
,
urlW
,
len
);
}
res
=
SHRestricted2W
(
restriction
,
urlW
,
reserved
);
heap_
free
(
urlW
);
free
(
urlW
);
return
res
;
}
...
...
@@ -547,10 +547,10 @@ BOOL WINAPI DoOrganizeFavDlg(HWND hwnd, LPCSTR initDir)
if
(
initDir
)
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
initDir
,
-
1
,
NULL
,
0
);
initDirW
=
heap_
alloc
(
len
*
sizeof
(
WCHAR
));
initDirW
=
m
alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
initDir
,
-
1
,
initDirW
,
len
);
}
res
=
DoOrganizeFavDlgW
(
hwnd
,
initDirW
);
heap_
free
(
initDirW
);
free
(
initDirW
);
return
res
;
}
dlls/shdocvw/shlinstobj.c
View file @
fdbd8cf0
...
...
@@ -105,7 +105,7 @@ static ULONG WINAPI RegistryPropertyBag_IPropertyBag_Release(IPropertyBag *iface
if
(
cRef
==
0
)
{
TRACE
(
"Destroying This=%p)
\n
"
,
This
);
RegCloseKey
(
This
->
m_hInitPropertyBagKey
);
heap_
free
(
This
);
free
(
This
);
SHDOCVW_UnlockModule
();
}
...
...
@@ -129,20 +129,20 @@ static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_Read(IPropertyBag *iface,
if
(
res
!=
ERROR_SUCCESS
)
return
E_INVALIDARG
;
pwszValue
=
heap_
alloc
(
cbData
);
pwszValue
=
m
alloc
(
cbData
);
if
(
!
pwszValue
)
return
E_OUTOFMEMORY
;
res
=
RegQueryValueExW
(
This
->
m_hInitPropertyBagKey
,
pwszPropName
,
NULL
,
&
dwType
,
(
LPBYTE
)
pwszValue
,
&
cbData
);
if
(
res
!=
ERROR_SUCCESS
)
{
heap_
free
(
pwszValue
);
free
(
pwszValue
);
return
E_INVALIDARG
;
}
V_VT
(
pVar
)
=
VT_BSTR
;
V_BSTR
(
pVar
)
=
SysAllocString
(
pwszValue
);
heap_
free
(
pwszValue
);
free
(
pwszValue
);
if
(
vtDst
!=
VT_BSTR
)
{
hr
=
VariantChangeTypeEx
(
pVar
,
pVar
,
LOCALE_SYSTEM_DEFAULT
,
0
,
vtDst
);
...
...
@@ -175,7 +175,7 @@ static HRESULT RegistryPropertyBag_Constructor(HKEY hInitPropertyBagKey, REFIID
TRACE
(
"(hInitPropertyBagKey=%p, riid=%s, ppvObject=%p)
\n
"
,
hInitPropertyBagKey
,
debugstr_guid
(
riid
),
ppvObject
);
pRegistryPropertyBag
=
heap_
alloc
(
sizeof
(
RegistryPropertyBag
));
pRegistryPropertyBag
=
m
alloc
(
sizeof
(
RegistryPropertyBag
));
if
(
pRegistryPropertyBag
)
{
pRegistryPropertyBag
->
IPropertyBag_iface
.
lpVtbl
=
&
RegistryPropertyBag_IPropertyBagVtbl
;
pRegistryPropertyBag
->
m_cRef
=
0
;
...
...
@@ -256,7 +256,7 @@ static ULONG WINAPI InstanceObjectFactory_IClassFactory_Release(IClassFactory *i
if
(
cRef
==
0
)
{
IClassFactory_LockServer
(
iface
,
FALSE
);
IPropertyBag_Release
(
This
->
m_pPropertyBag
);
heap_
free
(
This
);
free
(
This
);
}
return
cRef
;
...
...
@@ -322,7 +322,7 @@ static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *
TRACE
(
"(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)
\n
"
,
pPropertyBag
,
debugstr_guid
(
riid
),
ppvObject
);
pInstanceObjectFactory
=
heap_
alloc
(
sizeof
(
InstanceObjectFactory
));
pInstanceObjectFactory
=
m
alloc
(
sizeof
(
InstanceObjectFactory
));
if
(
pInstanceObjectFactory
)
{
pInstanceObjectFactory
->
IClassFactory_iface
.
lpVtbl
=
&
InstanceObjectFactory_IClassFactoryVtbl
;
pInstanceObjectFactory
->
m_cRef
=
0
;
...
...
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