From e98920f5f31db12aaaadbdc59508245328a442ae Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 18 Oct 2017 23:49:46 -0400 Subject: [PATCH] Check correct variable for malloc() results. --- src/audio/SDL_audiocvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c index 5bc70160d..3a10fc9f0 100644 --- a/src/audio/SDL_audiocvt.c +++ b/src/audio/SDL_audiocvt.c @@ -1299,7 +1299,7 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format, retval->staging_buffer_size = ((retval->resampler_padding_samples / retval->pre_resample_channels) * retval->src_sample_frame_size); if (retval->staging_buffer_size > 0) { retval->staging_buffer = (Uint8 *) SDL_malloc(retval->staging_buffer_size); - if (retval->resampler_padding == NULL) { + if (retval->staging_buffer == NULL) { SDL_FreeAudioStream(retval); SDL_OutOfMemory(); return NULL;