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
d4c0bedd
Commit
d4c0bedd
authored
Apr 27, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio.drv: Properly allocate and free the WAVEFORMATEX returned by IsFormatSupported.
parent
e3ff943e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+6
-2
No files found.
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
d4c0bedd
...
...
@@ -417,7 +417,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
if
(
This
->
aqueue
)
AudioQueueDispose
(
This
->
aqueue
,
1
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
public_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fmt
);
CoTaskMemFree
(
This
->
fmt
);
IMMDevice_Release
(
This
->
parent
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -498,7 +498,7 @@ static WAVEFORMATEX *clone_format(const WAVEFORMATEX *fmt)
else
size
=
sizeof
(
WAVEFORMATEX
);
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ret
=
CoTaskMemAlloc
(
size
);
if
(
!
ret
)
return
NULL
;
...
...
@@ -700,6 +700,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
if
(
!
buf
){
AudioQueueDispose
(
This
->
aqueue
,
1
);
This
->
aqueue
=
NULL
;
CoTaskMemFree
(
This
->
fmt
);
This
->
fmt
=
NULL
;
OSSpinLockUnlock
(
&
This
->
lock
);
return
E_OUTOFMEMORY
;
}
...
...
@@ -708,6 +710,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
if
(
sc
!=
noErr
){
AudioQueueDispose
(
This
->
aqueue
,
1
);
This
->
aqueue
=
NULL
;
CoTaskMemFree
(
This
->
fmt
);
This
->
fmt
=
NULL
;
OSSpinLockUnlock
(
&
This
->
lock
);
WARN
(
"Couldn't allocate buffer: %lx
\n
"
,
sc
);
return
E_FAIL
;
...
...
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