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 954552560d9d0ceb
parent 9544 520452e88618
child 9546 d997877cdad7
Fixed memory leak in failure case that static analysis found.
src/video/cocoa/SDL_cocoamodes.m
     1.1 --- a/src/video/cocoa/SDL_cocoamodes.m	Fri Apr 10 23:45:13 2015 +0200
     1.2 +++ b/src/video/cocoa/SDL_cocoamodes.m	Fri Apr 10 21:15:51 2015 -0400
     1.3 @@ -193,6 +193,7 @@
     1.4          break;
     1.5      case 8: /* We don't support palettized modes now */
     1.6      default: /* Totally unrecognizable bit depth. */
     1.7 +        SDL_free(data);
     1.8          return SDL_FALSE;
     1.9      }
    1.10      mode->w = width;