mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 17:47:16 +00:00
ncrypt: Use the wcsdup function instead of reimplementing it.
This commit is contained in:
parent
45c6da6508
commit
82faa82339
|
@ -95,13 +95,12 @@ struct object_property *add_object_property(struct object *object, const WCHAR *
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(property, 0, sizeof(*property));
|
memset(property, 0, sizeof(*property));
|
||||||
if (!(property->key = malloc((lstrlenW(name) + 1) * sizeof(WCHAR))))
|
if (!(property->key = wcsdup(name)))
|
||||||
{
|
{
|
||||||
ERR("Error allocating memory.\n");
|
ERR("Error allocating memory.\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
lstrcpyW(property->key, name);
|
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue