瀏覽代碼

Fix memory leak in SDL_SW_CreateYUVTexture

Mathieu Eyraud 3 年之前
父節點
當前提交
721ece7ba0
共有 1 個文件被更改,包括 1 次插入0 次删除
  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;
         }