Browse Source

Merge pull request #6969 from meyraud705/meyraud705-yuv_leak

Fix memory leak in SDL_SW_CreateYUVTexture
Sylvain Becker 2 years ago
parent
commit
5cf55c4f28
1 changed files with 1 additions and 0 deletions
  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;
         }