Skip to content

Commit 6aef6ae

Browse files
Sackzementslouken
authored andcommitted
AddPulseAudioDevice(): Fix use-after-free
1 parent 3b4cfc1 commit 6aef6ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/audio/pulseaudio/SDL_pulseaudio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,8 @@ static void AddPulseAudioDevice(const bool recording, const char *description, c
778778
SDL_free(handle);
779779
} else {
780780
handle->device_index = index;
781+
SDL_AddAudioDevice(recording, description, &spec, handle);
781782
}
782-
SDL_AddAudioDevice(recording, description, &spec, handle);
783783
}
784784
}
785785

0 commit comments

Comments
 (0)