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
8431e75a
Commit
8431e75a
authored
Oct 13, 2013
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Added some freeing of memory in error paths (Coverity).
parent
868890fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
frame.c
dlls/d3drm/frame.c
+9
-0
No files found.
dlls/d3drm/frame.c
View file @
8431e75a
...
...
@@ -758,7 +758,10 @@ static HRESULT WINAPI d3drm_frame2_GetVisuals(IDirect3DRMFrame2 *iface, IDirect3
ULONG
i
;
if
(
!
(
array
->
visuals
=
HeapAlloc
(
GetProcessHeap
(),
0
,
frame
->
nb_visuals
*
sizeof
(
*
array
->
visuals
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
frame
->
nb_visuals
;
++
i
)
{
array
->
visuals
[
i
]
=
frame
->
visuals
[
i
];
...
...
@@ -1506,7 +1509,10 @@ static HRESULT WINAPI d3drm_frame3_GetChildren(IDirect3DRMFrame3 *iface, IDirect
ULONG
i
;
if
(
!
(
array
->
frames
=
HeapAlloc
(
GetProcessHeap
(),
0
,
frame
->
nb_children
*
sizeof
(
*
array
->
frames
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
frame
->
nb_children
;
++
i
)
{
IDirect3DRMFrame3_QueryInterface
(
frame
->
children
[
i
],
&
IID_IDirect3DRMFrame
,
(
void
**
)
&
array
->
frames
[
i
]);
...
...
@@ -1544,7 +1550,10 @@ static HRESULT WINAPI d3drm_frame3_GetLights(IDirect3DRMFrame3 *iface, IDirect3D
ULONG
i
;
if
(
!
(
array
->
lights
=
HeapAlloc
(
GetProcessHeap
(),
0
,
frame
->
nb_lights
*
sizeof
(
*
array
->
lights
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
frame
->
nb_lights
;
++
i
)
{
IDirect3DRMLight_QueryInterface
(
frame
->
lights
[
i
],
&
IID_IDirect3DRMLight
,
(
void
**
)
&
array
->
lights
[
i
]);
...
...
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