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
c3a362a4
Commit
c3a362a4
authored
May 29, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix a memory leak in mciSendStringW (valgrind).
parent
d90d2ab5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mci.c
dlls/winmm/mci.c
+3
-3
No files found.
dlls/winmm/mci.c
View file @
c3a362a4
...
@@ -1316,7 +1316,7 @@ static DWORD MCI_HandleReturnValues(DWORD dwRet, LPWINE_MCIDRIVER wmd, DWORD ret
...
@@ -1316,7 +1316,7 @@ static DWORD MCI_HandleReturnValues(DWORD dwRet, LPWINE_MCIDRIVER wmd, DWORD ret
DWORD
WINAPI
mciSendStringW
(
LPCWSTR
lpstrCommand
,
LPWSTR
lpstrRet
,
DWORD
WINAPI
mciSendStringW
(
LPCWSTR
lpstrCommand
,
LPWSTR
lpstrRet
,
UINT
uRetLen
,
HWND
hwndCallback
)
UINT
uRetLen
,
HWND
hwndCallback
)
{
{
LPWSTR
verb
,
dev
,
args
;
LPWSTR
verb
,
dev
,
args
,
devType
=
NULL
;
LPWINE_MCIDRIVER
wmd
=
0
;
LPWINE_MCIDRIVER
wmd
=
0
;
MCIDEVICEID
uDevID
,
auto_open
=
0
;
MCIDEVICEID
uDevID
,
auto_open
=
0
;
DWORD
dwFlags
=
0
,
dwRet
=
0
;
DWORD
dwFlags
=
0
,
dwRet
=
0
;
...
@@ -1360,7 +1360,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
...
@@ -1360,7 +1360,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
/* Determine devType from open */
/* Determine devType from open */
if
(
!
strcmpW
(
verb
,
wszOpen
))
{
if
(
!
strcmpW
(
verb
,
wszOpen
))
{
LPWSTR
devType
,
tmp
;
LPWSTR
tmp
;
WCHAR
buf
[
128
];
WCHAR
buf
[
128
];
/* case dev == 'new' has to be handled */
/* case dev == 'new' has to be handled */
...
@@ -1426,7 +1426,6 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
...
@@ -1426,7 +1426,6 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
dwRet
=
MCI_LoadMciDriver
(
devType
,
&
wmd
);
dwRet
=
MCI_LoadMciDriver
(
devType
,
&
wmd
);
if
(
dwRet
==
MCIERR_DEVICE_NOT_INSTALLED
)
if
(
dwRet
==
MCIERR_DEVICE_NOT_INSTALLED
)
dwRet
=
MCIERR_INVALID_DEVICE_NAME
;
dwRet
=
MCIERR_INVALID_DEVICE_NAME
;
HeapFree
(
GetProcessHeap
(),
0
,
devType
);
if
(
dwRet
)
if
(
dwRet
)
goto
errCleanUp
;
goto
errCleanUp
;
}
else
if
((
MCI_ALL_DEVICE_ID
!=
uDevID
)
&&
!
(
wmd
=
MCI_GetDriver
(
mciGetDeviceIDW
(
dev
)))
}
else
if
((
MCI_ALL_DEVICE_ID
!=
uDevID
)
&&
!
(
wmd
=
MCI_GetDriver
(
mciGetDeviceIDW
(
dev
)))
...
@@ -1596,6 +1595,7 @@ errCleanUp:
...
@@ -1596,6 +1595,7 @@ errCleanUp:
}
}
if
(
wMsg
==
MCI_OPEN
&&
LOWORD
(
dwRet
)
&&
wmd
)
if
(
wMsg
==
MCI_OPEN
&&
LOWORD
(
dwRet
)
&&
wmd
)
MCI_UnLoadMciDriver
(
wmd
);
MCI_UnLoadMciDriver
(
wmd
);
HeapFree
(
GetProcessHeap
(),
0
,
devType
);
HeapFree
(
GetProcessHeap
(),
0
,
verb
);
HeapFree
(
GetProcessHeap
(),
0
,
verb
);
return
dwRet
;
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