mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
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:
@@ -77,10 +77,12 @@ check_modesetting(int devindex)
|
||||
|
||||
if (conn->connection == DRM_MODE_CONNECTED && conn->count_modes) {
|
||||
available = SDL_TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
KMSDRM_drmModeFreeConnector(conn);
|
||||
if (available) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
KMSDRM_drmModeFreeResources(resources);
|
||||
|
Reference in New Issue
Block a user