api: added missing allocation-failure check
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
0ad302c11d
commit
3058f1e57e
@ -21,6 +21,8 @@ NormalizeStringAlloc(_In_ NORM_FORM NormForm, _In_z_ const WCHAR *Source)
|
||||
if (Result)
|
||||
HeapFree(Heap, 0, Result);
|
||||
Result = HeapAlloc(Heap, 0, sizeof(WCHAR) * Len);
|
||||
if (!Result)
|
||||
return NULL;
|
||||
Len = NormalizeString(NormForm, Source, -1, Result, Len);
|
||||
if (Len > 0)
|
||||
return Result;
|
||||
|
Loading…
Reference in New Issue
Block a user