dsound: Use malloc and free instead of _recalloc.

The memory is completely overwritten a few lines later, so there is no
reason to preserve its original contents. Furthermore, _recalloc will
not be available if this DLL switches from ucrtbase to msvcrt, and the
code as written would leak memory if _recalloc failed.
This commit is contained in:
Alex Henrie 2023-09-16 11:43:50 -06:00 committed by Alexandre Julliard
parent d5988259c1
commit 269ce609d9

View file

@ -178,7 +178,8 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou
if (howmuch > 0) {
/* Make an internal copy of the caller-supplied array.
* Replace the existing copy if one is already present. */
This->notifies = _recalloc(This->notifies, howmuch, sizeof(DSBPOSITIONNOTIFY));
free(This->notifies);
This->notifies = malloc(howmuch * sizeof(DSBPOSITIONNOTIFY));
if (!This->notifies) {
WARN("out of memory\n");
return DSERR_OUTOFMEMORY;