mirror of
https://github.com/encounter/SDL.git
synced 2025-05-19 22:01:33 +00:00
fix memory leak in D3D11_CreateRenderer
This commit is contained in:
parent
3f8b450de2
commit
0983fcee5e
@ -2345,6 +2345,7 @@ D3D11_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||||||
|
|
||||||
data = (D3D11_RenderData *) SDL_calloc(1, sizeof(*data));
|
data = (D3D11_RenderData *) SDL_calloc(1, sizeof(*data));
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
SDL_free(renderer);
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user