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
726c5df5
Commit
726c5df5
authored
Nov 02, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenum: Use CRT allocation functions.
parent
d0153cf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
createdevenum.c
dlls/devenum/createdevenum.c
+6
-7
No files found.
dlls/devenum/createdevenum.c
View file @
726c5df5
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "dsound.h"
#include "dsound.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "mmddk.h"
#include "mmddk.h"
#include "initguid.h"
#include "initguid.h"
...
@@ -87,7 +86,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name,
...
@@ -87,7 +86,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name,
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
if
(
!
(
buffer
=
heap_
alloc
((
wcslen
(
L"@device:cm:"
)
+
CHARS_IN_GUID
+
wcslen
(
name
)
+
1
)
*
sizeof
(
WCHAR
))))
if
(
!
(
buffer
=
m
alloc
((
wcslen
(
L"@device:cm:"
)
+
CHARS_IN_GUID
+
wcslen
(
name
)
+
1
)
*
sizeof
(
WCHAR
))))
{
{
IParseDisplayName_Release
(
parser
);
IParseDisplayName_Release
(
parser
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -100,7 +99,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name,
...
@@ -100,7 +99,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name,
IParseDisplayName_ParseDisplayName
(
parser
,
NULL
,
buffer
,
&
eaten
,
&
mon
);
IParseDisplayName_ParseDisplayName
(
parser
,
NULL
,
buffer
,
&
eaten
,
&
mon
);
IParseDisplayName_Release
(
parser
);
IParseDisplayName_Release
(
parser
);
heap_
free
(
buffer
);
free
(
buffer
);
IMoniker_BindToStorage
(
mon
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
void
**
)
&
propbag
);
IMoniker_BindToStorage
(
mon
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
void
**
)
&
propbag
);
IMoniker_Release
(
mon
);
IMoniker_Release
(
mon
);
...
@@ -428,7 +427,7 @@ static void register_legacy_filters(void)
...
@@ -428,7 +427,7 @@ static void register_legacy_filters(void)
len
=
0
;
len
=
0
;
if
(
!
RegQueryValueExW
(
classkey
,
NULL
,
NULL
,
&
Type
,
NULL
,
&
len
))
if
(
!
RegQueryValueExW
(
classkey
,
NULL
,
NULL
,
&
Type
,
NULL
,
&
len
))
{
{
WCHAR
*
friendlyname
=
heap_
alloc
(
len
);
WCHAR
*
friendlyname
=
m
alloc
(
len
);
if
(
!
friendlyname
)
if
(
!
friendlyname
)
{
{
RegCloseKey
(
classkey
);
RegCloseKey
(
classkey
);
...
@@ -439,7 +438,7 @@ static void register_legacy_filters(void)
...
@@ -439,7 +438,7 @@ static void register_legacy_filters(void)
hr
=
register_codec
(
&
CLSID_LegacyAmFilterCategory
,
wszFilterSubkeyName
,
hr
=
register_codec
(
&
CLSID_LegacyAmFilterCategory
,
wszFilterSubkeyName
,
&
clsid
,
friendlyname
,
&
prop_bag
);
&
clsid
,
friendlyname
,
&
prop_bag
);
heap_
free
(
friendlyname
);
free
(
friendlyname
);
}
}
else
else
hr
=
register_codec
(
&
CLSID_LegacyAmFilterCategory
,
wszFilterSubkeyName
,
hr
=
register_codec
(
&
CLSID_LegacyAmFilterCategory
,
wszFilterSubkeyName
,
...
@@ -482,7 +481,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
...
@@ -482,7 +481,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
if
(
guid
)
if
(
guid
)
{
{
WCHAR
*
name
=
heap_
alloc
(
sizeof
(
defaultW
)
+
wcslen
(
desc
)
*
sizeof
(
WCHAR
));
WCHAR
*
name
=
m
alloc
(
sizeof
(
defaultW
)
+
wcslen
(
desc
)
*
sizeof
(
WCHAR
));
if
(
!
name
)
if
(
!
name
)
return
FALSE
;
return
FALSE
;
wcscpy
(
name
,
L"DirectSound: "
);
wcscpy
(
name
,
L"DirectSound: "
);
...
@@ -490,7 +489,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
...
@@ -490,7 +489,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
hr
=
register_codec
(
&
CLSID_AudioRendererCategory
,
name
,
hr
=
register_codec
(
&
CLSID_AudioRendererCategory
,
name
,
&
CLSID_DSoundRender
,
name
,
&
prop_bag
);
&
CLSID_DSoundRender
,
name
,
&
prop_bag
);
heap_
free
(
name
);
free
(
name
);
}
}
else
else
hr
=
register_codec
(
&
CLSID_AudioRendererCategory
,
defaultW
,
hr
=
register_codec
(
&
CLSID_AudioRendererCategory
,
defaultW
,
...
...
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