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