mirror of https://github.com/libsdl-org/SDL.git
AddPulseAudioDevice(): Fix use-after-free
This commit is contained in:
parent
3b4cfc11f0
commit
6aef6ae9a8
|
|
@ -778,9 +778,9 @@ static void AddPulseAudioDevice(const bool recording, const char *description, c
|
||||||
SDL_free(handle);
|
SDL_free(handle);
|
||||||
} else {
|
} else {
|
||||||
handle->device_index = index;
|
handle->device_index = index;
|
||||||
}
|
|
||||||
SDL_AddAudioDevice(recording, description, &spec, handle);
|
SDL_AddAudioDevice(recording, description, &spec, handle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called when PulseAudio adds an playback ("sink") device.
|
// This is called when PulseAudio adds an playback ("sink") device.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue