Commit 82faa823 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

ncrypt: Use the wcsdup function instead of reimplementing it.

parent 45c6da65
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment