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
90da8b74
Commit
90da8b74
authored
Feb 25, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciwave: Fix a leak when Open fails (valgrind).
parent
ea27fd99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
mciwave.c
dlls/mciwave/mciwave.c
+5
-3
No files found.
dlls/mciwave/mciwave.c
View file @
90da8b74
...
...
@@ -465,7 +465,7 @@ static LRESULT WAVE_mciOpenFile(WINE_MCIWAVE* wmw, LPCWSTR filename)
fn
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
filename
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
fn
)
return
MCIERR_OUT_OF_MEMORY
;
strcpyW
(
fn
,
filename
);
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
wmw
->
lpFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
wmw
->
lpFileName
);
wmw
->
lpFileName
=
fn
;
if
(
strlenW
(
filename
)
>
0
)
{
...
...
@@ -568,6 +568,8 @@ static LRESULT WAVE_mciOpen(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_P
if
(
wmw
->
hFile
!=
0
)
mmioClose
(
wmw
->
hFile
,
0
);
wmw
->
hFile
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
wmw
->
lpFileName
);
wmw
->
lpFileName
=
NULL
;
}
return
dwRet
;
}
...
...
@@ -680,7 +682,7 @@ static DWORD WAVE_mciClose(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_GENERIC_PARM
if
(
wmw
->
lpWaveFormat
!=
&
wmw
->
wfxRef
)
HeapFree
(
GetProcessHeap
(),
0
,
wmw
->
lpWaveFormat
);
wmw
->
lpWaveFormat
=
&
wmw
->
wfxRef
;
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
wmw
->
lpFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
wmw
->
lpFileName
);
wmw
->
lpFileName
=
NULL
;
if
((
dwFlags
&
MCI_NOTIFY
)
&&
lpParms
)
{
...
...
@@ -1025,7 +1027,7 @@ static DWORD WAVE_mciRecord(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt
* we don't modify the wave part of an existing file (ie. we always erase an
* existing content, we don't overwrite)
*/
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
wmw
->
lpFileName
);
HeapFree
(
GetProcessHeap
(),
0
,
wmw
->
lpFileName
);
dwRet
=
create_tmp_file
(
&
wmw
->
hFile
,
(
WCHAR
**
)
&
wmw
->
lpFileName
);
if
(
dwRet
!=
0
)
return
dwRet
;
...
...
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