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