Commit d9636260 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winmm: Fix pszSound allocation in PlaySound_Alloc().

parent c07d50c3
......@@ -231,8 +231,9 @@ static WINE_PLAYSOUND* PlaySound_Alloc(const void* pszSound, HMODULE hmod,
else
{
UNICODE_STRING usBuffer;
RtlCreateUnicodeStringFromAsciiz(&usBuffer, pszSound);
wps->pszSound = usBuffer.Buffer;
if (!RtlCreateUnicodeStringFromAsciiz(&usBuffer, pszSound)) goto oom_error;
wps->pszSound = wcsdup(usBuffer.Buffer);
RtlFreeUnicodeString(&usBuffer);
if (!wps->pszSound) goto oom_error;
wps->bAlloc = TRUE;
}
......
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