mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
wbemdisp: Use wcsdup() instead of internal helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
da8a36c50e
commit
f9739a5963
|
@ -50,14 +50,6 @@ static IWbemContext * unsafe_get_context_from_namedvalueset( IDispatch *disp )
|
|||
return valueset ? valueset->context : NULL;
|
||||
}
|
||||
|
||||
static WCHAR *heap_strdupW( const WCHAR *src )
|
||||
{
|
||||
WCHAR *dst;
|
||||
if (!src) return NULL;
|
||||
if ((dst = malloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
|
||||
return dst;
|
||||
}
|
||||
|
||||
struct services;
|
||||
|
||||
static HRESULT EnumVARIANT_create( struct services *, IEnumWbemClassObject *, IEnumVARIANT ** );
|
||||
|
@ -784,7 +776,7 @@ static HRESULT SWbemMethod_create( struct methodset *set, const WCHAR *name, ISW
|
|||
method->refs = 1;
|
||||
method->set = set;
|
||||
ISWbemMethodSet_AddRef( &method->set->ISWbemMethodSet_iface );
|
||||
if (!(method->name = heap_strdupW( name )))
|
||||
if (!(method->name = wcsdup( name )))
|
||||
{
|
||||
ISWbemMethod_Release( &method->ISWbemMethod_iface );
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
Loading…
Reference in a new issue