Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
89f10a0f
Commit
89f10a0f
authored
Apr 07, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmic: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
00291118
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
main.c
programs/wmic/main.c
+2
-11
No files found.
programs/wmic/main.c
View file @
89f10a0f
...
...
@@ -61,15 +61,6 @@ static const WCHAR *find_class( const WCHAR *alias )
return
NULL
;
}
static
inline
WCHAR
*
strdupW
(
const
WCHAR
*
src
)
{
WCHAR
*
dst
;
if
(
!
src
)
return
NULL
;
if
(
!
(
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
)
)))
return
NULL
;
lstrcpyW
(
dst
,
src
);
return
dst
;
}
static
WCHAR
*
find_prop
(
IWbemClassObject
*
class
,
const
WCHAR
*
prop
)
{
SAFEARRAY
*
sa
;
...
...
@@ -85,7 +76,7 @@ static WCHAR *find_prop( IWbemClassObject *class, const WCHAR *prop )
SafeArrayGetElement
(
sa
,
&
i
,
&
str
);
if
(
!
wcsicmp
(
str
,
prop
))
{
ret
=
strdupW
(
str
);
ret
=
wcsdup
(
str
);
break
;
}
}
...
...
@@ -228,7 +219,7 @@ done:
SysFreeString
(
path
);
SysFreeString
(
query
);
SysFreeString
(
wql
);
HeapFree
(
GetProcessHeap
(),
0
,
prop
);
free
(
prop
);
CoUninitialize
();
return
ret
;
}
...
...
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