kmsdrm: do not leak drmModeConnector

Previously conn was leaked on the success path (when available was
set to SDL_TRUE).
This commit is contained in:
RALOVICH, Kristof 2020-07-20 10:09:07 -07:00
parent 412b21b0e8
commit c7eb557d89
1 changed files with 3 additions and 1 deletions

View File

@ -77,10 +77,12 @@ check_modesetting(int devindex)
if (conn->connection == DRM_MODE_CONNECTED && conn->count_modes) { if (conn->connection == DRM_MODE_CONNECTED && conn->count_modes) {
available = SDL_TRUE; available = SDL_TRUE;
break;
} }
KMSDRM_drmModeFreeConnector(conn); KMSDRM_drmModeFreeConnector(conn);
if (available) {
break;
}
} }
} }
KMSDRM_drmModeFreeResources(resources); KMSDRM_drmModeFreeResources(resources);