mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Wayland: Fixed memory leak if output retrieval failed.
Found by Cppcheck.
This commit is contained in:
parent
97aa577589
commit
6fe15d6347
@ -271,6 +271,7 @@ Wayland_add_display(SDL_VideoData *d, uint32_t id)
|
|||||||
output = wl_registry_bind(d->registry, id, &wl_output_interface, 2);
|
output = wl_registry_bind(d->registry, id, &wl_output_interface, 2);
|
||||||
if (!output) {
|
if (!output) {
|
||||||
SDL_SetError("Failed to retrieve output.");
|
SDL_SetError("Failed to retrieve output.");
|
||||||
|
SDL_free(display);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user