fix memory leak in D3D11_CreateRenderer
This commit is contained in:
parent
3f8b450de2
commit
0983fcee5e
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue