Fix memory leak in WIN_GetMonitorPathInfo

main
Mathieu Eyraud 2024-04-05 19:10:52 +02:00 committed by Sam Lantinga
parent db9b4ba2fa
commit 29d43272e2
1 changed files with 2 additions and 0 deletions

View File

@ -407,6 +407,8 @@ static SDL_bool WIN_GetMonitorPathInfo(HMONITOR hMonitor, DISPLAYCONFIG_PATH_INF
do { do {
if (GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &num_path_array_elements, &num_mode_info_array_elements) != ERROR_SUCCESS) { if (GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &num_path_array_elements, &num_mode_info_array_elements) != ERROR_SUCCESS) {
SDL_free(path_infos);
SDL_free(mode_infos);
return SDL_FALSE; return SDL_FALSE;
} }