Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3d61013e
Commit
3d61013e
authored
Sep 12, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Sep 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avifil32: Fix some memory leaks.
parent
ae8e8a0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
api.c
dlls/avifil32/api.c
+1
-1
avifile.c
dlls/avifil32/avifile.c
+9
-7
No files found.
dlls/avifil32/api.c
View file @
3d61013e
...
@@ -1913,7 +1913,7 @@ HRESULT WINAPI AVISaveVW(LPCWSTR szFile, CLSID *pclsidHandler,
...
@@ -1913,7 +1913,7 @@ HRESULT WINAPI AVISaveVW(LPCWSTR szFile, CLSID *pclsidHandler,
hres
=
AVIStreamReadFormat
(
pInStreams
[
curStream
],
sInfo
.
dwStart
,
hres
=
AVIStreamReadFormat
(
pInStreams
[
curStream
],
sInfo
.
dwStart
,
lpBuffer
,
&
lBufferSize
);
lpBuffer
,
&
lBufferSize
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
goto
error
;
AVIStreamSetFormat
(
pOutStreams
[
curStream
],
sInfo
.
dwStart
,
AVIStreamSetFormat
(
pOutStreams
[
curStream
],
sInfo
.
dwStart
,
lpBuffer
,
lBufferSize
);
lpBuffer
,
lBufferSize
);
...
...
dlls/avifil32/avifile.c
View file @
3d61013e
...
@@ -1018,14 +1018,15 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
...
@@ -1018,14 +1018,15 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
lppc
->
peNew
[
n
].
peFlags
=
0
;
lppc
->
peNew
[
n
].
peFlags
=
0
;
}
}
if
(
mmioSeek
(
This
->
paf
->
hmmio
,
This
->
paf
->
dwNextFramePos
,
SEEK_SET
)
==
-
1
)
if
(
mmioSeek
(
This
->
paf
->
hmmio
,
This
->
paf
->
dwNextFramePos
,
SEEK_SET
)
==
-
1
||
return
AVIERR_FILEWRITE
;
mmioCreateChunk
(
This
->
paf
->
hmmio
,
&
ck
,
0
)
!=
S_OK
||
if
(
mmioCreateChunk
(
This
->
paf
->
hmmio
,
&
ck
,
0
)
!=
S_OK
)
mmioWrite
(
This
->
paf
->
hmmio
,
(
HPSTR
)
lppc
,
ck
.
cksize
)
!=
ck
.
cksize
||
return
AVIERR_FILEWRITE
;
mmioAscend
(
This
->
paf
->
hmmio
,
&
ck
,
0
)
!=
S_OK
)
if
(
mmioWrite
(
This
->
paf
->
hmmio
,
(
HPSTR
)
lppc
,
ck
.
cksize
)
!=
ck
.
cksize
)
{
return
AVIERR_FILEWRITE
;
HeapFree
(
GetProcessHeap
(),
0
,
lppc
);
if
(
mmioAscend
(
This
->
paf
->
hmmio
,
&
ck
,
0
)
!=
S_OK
)
return
AVIERR_FILEWRITE
;
return
AVIERR_FILEWRITE
;
}
This
->
paf
->
dwNextFramePos
+=
ck
.
cksize
+
2
*
sizeof
(
DWORD
);
This
->
paf
->
dwNextFramePos
+=
ck
.
cksize
+
2
*
sizeof
(
DWORD
);
HeapFree
(
GetProcessHeap
(),
0
,
lppc
);
HeapFree
(
GetProcessHeap
(),
0
,
lppc
);
...
@@ -1939,6 +1940,7 @@ static HRESULT AVIFILE_LoadIndex(const IAVIFileImpl *This, DWORD size, DWORD off
...
@@ -1939,6 +1940,7 @@ static HRESULT AVIFILE_LoadIndex(const IAVIFileImpl *This, DWORD size, DWORD off
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
pStream
->
nIdxFrames
*
sizeof
(
AVIINDEXENTRY
));
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
pStream
->
nIdxFrames
*
sizeof
(
AVIINDEXENTRY
));
if
(
pStream
->
idxFrames
==
NULL
&&
pStream
->
nIdxFrames
>
0
)
{
if
(
pStream
->
idxFrames
==
NULL
&&
pStream
->
nIdxFrames
>
0
)
{
pStream
->
nIdxFrames
=
0
;
pStream
->
nIdxFrames
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
lp
);
return
AVIERR_MEMORY
;
return
AVIERR_MEMORY
;
}
}
}
}
...
...
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