Bug 1786 - memory leak in WIN_GetDisplayModes by Marcel Bakker
This commit is contained in:
parent
c443135e94
commit
742233249a
1 changed files with 4 additions and 0 deletions
|
@ -245,6 +245,7 @@ WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
|
||||||
}
|
}
|
||||||
if (SDL_ISPIXELFORMAT_INDEXED(mode.format)) {
|
if (SDL_ISPIXELFORMAT_INDEXED(mode.format)) {
|
||||||
/* We don't support palettized modes now */
|
/* We don't support palettized modes now */
|
||||||
|
SDL_free(mode.driverdata);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (mode.format != SDL_PIXELFORMAT_UNKNOWN) {
|
if (mode.format != SDL_PIXELFORMAT_UNKNOWN) {
|
||||||
|
@ -252,6 +253,9 @@ WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
|
||||||
SDL_free(mode.driverdata);
|
SDL_free(mode.driverdata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
SDL_free(mode.driverdata);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue