Explorar o código

Fix memory leak in SDL_SW_CreateYUVTexture

Mathieu Eyraud %!s(int64=3) %!d(string=hai) anos
pai
achega
721ece7ba0
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/render/SDL_yuv_sw.c

+ 1 - 0
src/render/SDL_yuv_sw.c

@@ -59,6 +59,7 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
     {
         size_t dst_size;
         if (SDL_CalculateYUVSize(format, w, h, &dst_size, NULL) < 0) {
+            SDL_SW_DestroyYUVTexture(swdata);
             SDL_OutOfMemory();
             return NULL;
         }