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
99e36ffa
Commit
99e36ffa
authored
Feb 01, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Feb 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxdiagn: Avoid zeroing memory in container functions.
parent
efbe6951
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
container.c
dlls/dxdiagn/container.c
+12
-4
No files found.
dlls/dxdiagn/container.c
View file @
99e36ffa
...
...
@@ -244,13 +244,17 @@ HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwsz
return
E_INVALIDARG
;
}
pNew
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDxDiagContainerImpl_Property
));
pNew
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IDxDiagContainerImpl_Property
));
if
(
NULL
==
pNew
)
{
return
E_OUTOFMEMORY
;
}
VariantInit
(
&
pNew
->
v
);
VariantCopy
(
&
pNew
->
v
,
pVarProp
);
pNew
->
vName
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
lstrlenW
(
pwszPropName
)
+
1
)
*
sizeof
(
WCHAR
));
pNew
->
vName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
pwszPropName
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
NULL
==
pNew
->
vName
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pNew
);
return
E_OUTOFMEMORY
;
}
lstrcpyW
(
pNew
->
vName
,
pwszPropName
);
pNew
->
next
=
NULL
;
...
...
@@ -278,12 +282,16 @@ HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LP
return
E_INVALIDARG
;
}
pNew
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDxDiagContainerImpl_SubContainer
));
pNew
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IDxDiagContainerImpl_SubContainer
));
if
(
NULL
==
pNew
)
{
return
E_OUTOFMEMORY
;
}
pNew
->
pCont
=
pSubCont
;
pNew
->
contName
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
lstrlenW
(
pszContName
)
+
1
)
*
sizeof
(
WCHAR
));
pNew
->
contName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
pszContName
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
NULL
==
pNew
->
contName
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pNew
)
return
E_OUTOFMEMORY
;
}
lstrcpyW
(
pNew
->
contName
,
pszContName
);
pNew
->
next
=
NULL
;
...
...
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