Fix memory leak in SDL_SW_CreateYUVTexture

This commit is contained in:
Mathieu Eyraud 2023-01-02 10:22:44 +01:00 committed by GitHub
parent 9148c89d23
commit 721ece7ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}