Skip to content
Snippets Groups Projects
Commit e03611ee authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard
Browse files

winecoreaudio: Set the buffer to NULL after freeing.

This ensures the subsequent allocation is free to pick a new location.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52202


Signed-off-by: default avatarHuw Davies <huw@codeweavers.com>
Signed-off-by: default avatarAndrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent b498f38e
No related branches found
No related tags found
No related merge requests found
......@@ -1352,8 +1352,11 @@ static NTSTATUS get_render_buffer(void *args)
if(stream->wri_offs_frames + params->frames > stream->bufsize_frames){
if(stream->tmp_buffer_frames < params->frames){
NtFreeVirtualMemory(GetCurrentProcess(), (void **)&stream->tmp_buffer,
&stream->tmp_buffer_size, MEM_RELEASE);
if(stream->tmp_buffer){
NtFreeVirtualMemory(GetCurrentProcess(), (void **)&stream->tmp_buffer,
&stream->tmp_buffer_size, MEM_RELEASE);
stream->tmp_buffer = NULL;
}
stream->tmp_buffer_size = params->frames * stream->fmt->nBlockAlign;
if(NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&stream->tmp_buffer, 0,
&stream->tmp_buffer_size, MEM_COMMIT, PAGE_READWRITE)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment