Skip to content

Commit

Permalink
Unload Wayland libs if memory allocation fails during init.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 3, 2014
1 parent 89fd0fa commit bd01a9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video/wayland/SDL_waylandvideo.c
Expand Up @@ -95,6 +95,7 @@ Wayland_CreateDevice(int devindex)
/* Initialize all variables that we clean on shutdown */
device = SDL_calloc(1, sizeof(SDL_VideoDevice));
if (!device) {
SDL_WAYLAND_UnloadSymbols();
SDL_OutOfMemory();
return NULL;
}
Expand Down

0 comments on commit bd01a9c

Please sign in to comment.