mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Fix memory leak in SDL_SW_CreateYUVTexture
This commit is contained in:
@@ -59,6 +59,7 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
|
|||||||
{
|
{
|
||||||
size_t dst_size;
|
size_t dst_size;
|
||||||
if (SDL_CalculateYUVSize(format, w, h, &dst_size, NULL) < 0) {
|
if (SDL_CalculateYUVSize(format, w, h, &dst_size, NULL) < 0) {
|
||||||
|
SDL_SW_DestroyYUVTexture(swdata);
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user