Fixed memory leak in an error case
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Sep 2012 02:43:13 -0700
changeset 6490d2d8576aa3a0
parent 6489 31449ea8f934
child 6491 03b7e6b0a8bf
Fixed memory leak in an error case
src/render/SDL_yuv_sw.c
     1.1 --- a/src/render/SDL_yuv_sw.c	Fri Sep 28 02:33:42 2012 -0700
     1.2 +++ b/src/render/SDL_yuv_sw.c	Fri Sep 28 02:43:13 2012 -0700
     1.3 @@ -1044,6 +1044,7 @@
     1.4      case SDL_PIXELFORMAT_YVYU:
     1.5          break;
     1.6      default:
     1.7 +        SDL_SW_DestroyYUVTexture(swdata);
     1.8          SDL_SetError("Unsupported YUV format");
     1.9          return NULL;
    1.10      }