From 3d6ba0cafd30f1469a61be2fa14a6b08e646e653 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 5 Jul 2023 02:43:54 -0400 Subject: [PATCH] ps2audio: Removed free of buffer that hasn't been allocated yet. --- src/audio/ps2/SDL_ps2audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/audio/ps2/SDL_ps2audio.c b/src/audio/ps2/SDL_ps2audio.c index 6315678a2b..22d841d47f 100644 --- a/src/audio/ps2/SDL_ps2audio.c +++ b/src/audio/ps2/SDL_ps2audio.c @@ -62,8 +62,6 @@ static int PS2AUDIO_OpenDevice(SDL_AudioDevice *device) audsrv_set_volume(MAX_VOLUME); if (_this->hidden->channel < 0) { - SDL_aligned_free(_this->hidden->rawbuf); - _this->hidden->rawbuf = NULL; return SDL_SetError("Couldn't reserve hardware channel"); } @@ -101,7 +99,7 @@ static Uint8 *PS2AUDIO_GetDeviceBuf(SDL_AudioDevice *device, int *buffer_size) { Uint8 *buffer = device->hidden->mixbufs[device->hidden->next_buffer]; device->hidden->next_buffer = (device->hidden->next_buffer + 1) % NUM_BUFFERS; - return buffer;; + return buffer; } static void PS2AUDIO_CloseDevice(SDL_AudioDevice *device)