SDL: audio: Moved a variable into nested scope where it's actually used.

From ac3afa1f385518712ca58d818a58384d2cc3d683 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 11 Feb 2026 14:54:14 -0500
Subject: [PATCH] audio: Moved a variable into nested scope where it's actually
 used.

---
 src/audio/SDL_audio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index c1e424142bc52..8b82eff33f794 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -2464,11 +2464,9 @@ void SDL_DefaultAudioDeviceChanged(SDL_AudioDevice *new_default_device)
 
                 SDL_SetAudioPostmixCallback(logdev->instance_id, logdev->postmix, logdev->postmix_userdata);
 
-                SDL_PendingAudioDeviceEvent *p;
-
                 // Queue an event for each logical device we moved.
                 if (spec_changed) {
-                    p = (SDL_PendingAudioDeviceEvent *)SDL_malloc(sizeof(SDL_PendingAudioDeviceEvent));
+                    SDL_PendingAudioDeviceEvent *p = (SDL_PendingAudioDeviceEvent *)SDL_malloc(sizeof(SDL_PendingAudioDeviceEvent));
                     if (p) { // if this failed, no event for you, but you have deeper problems anyhow.
                         p->type = SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED;
                         p->devid = logdev->instance_id;