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
29d4ab13
Commit
29d4ab13
authored
Dec 23, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Release properly all allocated resources.
parent
23a3552d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
d3dxof.c
dlls/d3dxof/d3dxof.c
+13
-3
d3dxof_private.h
dlls/d3dxof/d3dxof_private.h
+1
-0
No files found.
dlls/d3dxof/d3dxof.c
View file @
29d4ab13
...
...
@@ -1538,7 +1538,14 @@ static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData* iface)
TRACE
(
"(%p/%p): ReleaseRef to %d
\n
"
,
iface
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
This
->
level
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pdata
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pstrings
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
...
...
@@ -1902,7 +1909,10 @@ static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* i
if
(
!
ref
)
{
CloseHandle
(
This
->
hFile
);
if
(
This
->
source
==
DXFILELOAD_FROMFILE
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
buf
.
buffer
);
if
(
This
->
hFile
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
This
->
hFile
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -2258,7 +2268,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
hr
=
DXFILEERR_BADALLOC
;
goto
error
;
}
This
->
buf
.
cur_pdata
=
This
->
buf
.
pdata
=
pdata
;
This
->
buf
.
cur_pdata
=
This
->
buf
.
pdata
=
object
->
pdata
=
pdata
;
pstrings
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_STRINGS_BUFFER
);
if
(
!
pstrings
)
...
...
@@ -2267,7 +2277,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
hr
=
DXFILEERR_BADALLOC
;
goto
error
;
}
This
->
buf
.
cur_pstrings
=
This
->
buf
.
pstrings
=
pstrings
;
This
->
buf
.
cur_pstrings
=
This
->
buf
.
pstrings
=
object
->
pstrings
=
pstrings
;
if
(
!
parse_object
(
&
This
->
buf
))
{
...
...
dlls/d3dxof/d3dxof_private.h
View file @
29d4ab13
...
...
@@ -104,6 +104,7 @@ typedef struct {
int
cur_enum_object
;
BOOL
from_ref
;
ULONG
level
;
LPBYTE
pdata
;
LPBYTE
pstrings
;
}
IDirectXFileDataImpl
;
...
...
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