Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
kmsdrm: do not leak drmModeConnector
Previously conn was leaked on the success path (when available was
set to SDL_TRUE).
  • Loading branch information
RALOVICH, Kristof committed Jul 20, 2020
1 parent 412b21b commit c7eb557
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -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);
Expand Down

0 comments on commit c7eb557

Please sign in to comment.