Fixed memory leak in failure case that static analysis found.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 10 Apr 2015 21:15:51 -0400
changeset 9545 52560d9d0ceb
parent 9544 520452e88618
child 9546 d997877cdad7
Fixed memory leak in failure case that static analysis found.
src/video/cocoa/SDL_cocoamodes.m
--- a/src/video/cocoa/SDL_cocoamodes.m	Fri Apr 10 23:45:13 2015 +0200
+++ b/src/video/cocoa/SDL_cocoamodes.m	Fri Apr 10 21:15:51 2015 -0400
@@ -193,6 +193,7 @@
         break;
     case 8: /* We don't support palettized modes now */
     default: /* Totally unrecognizable bit depth. */
+        SDL_free(data);
         return SDL_FALSE;
     }
     mode->w = width;