Skip to content

Commit

Permalink
Wayland: Fixed memory leak if output retrieval failed.
Browse files Browse the repository at this point in the history
Found by Cppcheck.
  • Loading branch information
philippwiesemann committed Nov 16, 2016
1 parent 97aa577 commit 6fe15d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video/wayland/SDL_waylandvideo.c
Expand Up @@ -271,6 +271,7 @@ Wayland_add_display(SDL_VideoData *d, uint32_t id)
output = wl_registry_bind(d->registry, id, &wl_output_interface, 2);
if (!output) {
SDL_SetError("Failed to retrieve output.");
SDL_free(display);
return;
}

Expand Down

0 comments on commit 6fe15d6

Please sign in to comment.