Alex Henrie : ncrypt: Use the wcsdup function instead of reimplementing it.
Module: wine Branch: master Commit: 82faa82339cf25a573f729bb159c683c626127ec URL: https://gitlab.winehq.org/wine/wine/-/commit/82faa82339cf25a573f729bb159c683... Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Sep 19 23:18:36 2023 -0600 ncrypt: Use the wcsdup function instead of reimplementing it. --- dlls/ncrypt/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ncrypt/main.c b/dlls/ncrypt/main.c index fa2eff49774..8a720382bef 100644 --- a/dlls/ncrypt/main.c +++ b/dlls/ncrypt/main.c @@ -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; }
participants (1)
-
Alexandre Julliard