mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 09:14:10 +00:00
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:
parent
d5988259c1
commit
269ce609d9
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue