ncrypt: Use the wcsdup function instead of reimplementing it.

This commit is contained in:
Alex Henrie 2023-09-19 23:18:36 -06:00 committed by Alexandre Julliard
parent 45c6da6508
commit 82faa82339

View file

@ -95,13 +95,12 @@ struct object_property *add_object_property(struct object *object, const WCHAR *
}
memset(property, 0, sizeof(*property));
if (!(property->key = malloc((lstrlenW(name) + 1) * sizeof(WCHAR))))
if (!(property->key = wcsdup(name)))
{
ERR("Error allocating memory.\n");
return NULL;
}
lstrcpyW(property->key, name);
return property;
}