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
9bc54545
Commit
9bc54545
authored
Jan 14, 2022
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio.drv: Fix memory leak.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
867e3293
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
coreaudio.c
dlls/winecoreaudio.drv/coreaudio.c
+11
-5
No files found.
dlls/winecoreaudio.drv/coreaudio.c
View file @
9bc54545
...
...
@@ -709,6 +709,7 @@ static NTSTATUS release_stream( void *args )
{
struct
release_stream_params
*
params
=
args
;
struct
coreaudio_stream
*
stream
=
params
->
stream
;
SIZE_T
size
;
if
(
stream
->
unit
){
AudioOutputUnitStop
(
stream
->
unit
);
...
...
@@ -719,12 +720,16 @@ static NTSTATUS release_stream( void *args )
free
(
stream
->
resamp_buffer
);
free
(
stream
->
wrap_buffer
);
free
(
stream
->
cap_buffer
);
if
(
stream
->
local_buffer
)
if
(
stream
->
local_buffer
){
size
=
0
;
NtFreeVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
stream
->
local_buffer
,
&
stream
->
local_buffer_size
,
MEM_RELEASE
);
if
(
stream
->
tmp_buffer
)
&
size
,
MEM_RELEASE
);
}
if
(
stream
->
tmp_buffer
){
size
=
0
;
NtFreeVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
stream
->
tmp_buffer
,
&
stream
->
tmp_buffer_size
,
MEM_RELEASE
);
&
size
,
MEM_RELEASE
);
}
free
(
stream
->
fmt
);
free
(
stream
);
params
->
result
=
S_OK
;
...
...
@@ -1354,8 +1359,9 @@ static NTSTATUS get_render_buffer(void *args)
if
(
stream
->
wri_offs_frames
+
params
->
frames
>
stream
->
bufsize_frames
){
if
(
stream
->
tmp_buffer_frames
<
params
->
frames
){
if
(
stream
->
tmp_buffer
){
SIZE_T
size
=
0
;
NtFreeVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
stream
->
tmp_buffer
,
&
s
tream
->
tmp_buffer_s
ize
,
MEM_RELEASE
);
&
size
,
MEM_RELEASE
);
stream
->
tmp_buffer
=
NULL
;
}
stream
->
tmp_buffer_size
=
params
->
frames
*
stream
->
fmt
->
nBlockAlign
;
...
...
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