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
0bd62fdd
Commit
0bd62fdd
authored
Feb 12, 2009
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winenas.drv: Replace malloc() with HeapAlloc().
parent
5a556de5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
audio.c
dlls/winenas.drv/audio.c
+5
-5
No files found.
dlls/winenas.drv/audio.c
View file @
0bd62fdd
...
...
@@ -1382,11 +1382,11 @@ event_handler(AuServer* aud, AuEvent* ev, AuEventHandlerRec* hnd)
static
void
buffer_resize
(
WINE_WAVEOUT
*
wwo
,
int
len
)
{
void
*
newbuf
=
malloc
(
wwo
->
BufferUsed
+
len
);
void
*
newbuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wwo
->
BufferUsed
+
len
);
void
*
oldbuf
=
wwo
->
SoundBuffer
;
memcpy
(
newbuf
,
oldbuf
,
wwo
->
BufferUsed
);
wwo
->
SoundBuffer
=
newbuf
;
free
(
oldbuf
);
HeapFree
(
GetProcessHeap
(),
0
,
oldbuf
);
}
static
int
nas_add_buffer
(
WINE_WAVEOUT
*
wwo
)
{
...
...
@@ -1417,9 +1417,9 @@ static int nas_send_buffer(WINE_WAVEOUT* wwo) {
ptr
=
wwo
->
SoundBuffer
;
}
else
{
len
=
wwo
->
freeBytes
;
ptr
=
malloc
(
len
);
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
memcpy
(
ptr
,
wwo
->
SoundBuffer
,
len
);
newdata
=
malloc
(
wwo
->
BufferUsed
-
len
);
newdata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wwo
->
BufferUsed
-
len
);
memcpy
(
newdata
,
wwo
->
SoundBuffer
+
len
,
wwo
->
BufferUsed
-
len
);
}
...
...
@@ -1431,7 +1431,7 @@ static int nas_send_buffer(WINE_WAVEOUT* wwo) {
wwo
->
freeBytes
-=
len
;
wwo
->
writeBytes
+=
len
;
free
(
ptr
);
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
wwo
->
SoundBuffer
=
NULL
;
...
...
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