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
6dedfec9
Commit
6dedfec9
authored
Aug 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Use CRT allocation functions.
parent
5e29d147
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
synth.c
dlls/dmsynth/synth.c
+3
-6
synthsink.c
dlls/dmsynth/synthsink.c
+3
-6
No files found.
dlls/dmsynth/synth.c
View file @
6dedfec9
...
...
@@ -96,7 +96,7 @@ static ULONG WINAPI synth_Release(IDirectMusicSynth8 *iface)
if
(
!
ref
)
{
if
(
This
->
latency_clock
)
IReferenceClock_Release
(
This
->
latency_clock
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
free
(
This
);
}
return
ref
;
...
...
@@ -744,11 +744,8 @@ HRESULT DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj)
TRACE
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
ppobj
);
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
obj
));
if
(
NULL
==
obj
)
{
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
*
ppobj
=
NULL
;
if
(
!
(
obj
=
calloc
(
1
,
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
obj
->
IDirectMusicSynth8_iface
.
lpVtbl
=
&
synth_vtbl
;
obj
->
IKsControl_iface
.
lpVtbl
=
&
synth_control_vtbl
;
obj
->
ref
=
1
;
...
...
dlls/dmsynth/synthsink.c
View file @
6dedfec9
...
...
@@ -92,7 +92,7 @@ static ULONG WINAPI synth_sink_Release(IDirectMusicSynthSink *iface)
IReferenceClock_Release
(
This
->
latency_clock
);
if
(
This
->
master_clock
)
IReferenceClock_Release
(
This
->
master_clock
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
free
(
This
);
}
return
ref
;
...
...
@@ -315,10 +315,7 @@ HRESULT DMUSIC_CreateDirectMusicSynthSinkImpl(REFIID riid, void **ret_iface)
*
ret_iface
=
NULL
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
synth_sink
));
if
(
!
obj
)
return
E_OUTOFMEMORY
;
if
(
!
(
obj
=
calloc
(
1
,
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
obj
->
IDirectMusicSynthSink_iface
.
lpVtbl
=
&
synth_sink_vtbl
;
obj
->
IKsControl_iface
.
lpVtbl
=
&
synth_sink_control
;
obj
->
ref
=
1
;
...
...
@@ -326,7 +323,7 @@ HRESULT DMUSIC_CreateDirectMusicSynthSinkImpl(REFIID riid, void **ret_iface)
hr
=
CoCreateInstance
(
&
CLSID_SystemClock
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IReferenceClock
,
(
LPVOID
*
)
&
obj
->
latency_clock
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
obj
);
free
(
obj
);
return
hr
;
}
...
...
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