mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
Merge pull request #4065 from lioncash/leak
drm_gfx: Fix a memory leak in the initialization fail case
This commit is contained in:
commit
33a9132c8d
@ -728,10 +728,13 @@ static void *drm_gfx_init(const video_info_t *video,
|
||||
if (!init_drm())
|
||||
{
|
||||
RARCH_ERR ("DRM: Failed to initialize DRM\n");
|
||||
free(_drmvars);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
RARCH_LOG ("DRM: Init succesful.\n");
|
||||
{
|
||||
RARCH_LOG ("DRM: Init successful.\n");
|
||||
}
|
||||
|
||||
_drmvars->kms_width = drm.current_mode->hdisplay;
|
||||
_drmvars->kms_height = drm.current_mode->vdisplay;
|
||||
|
Loading…
x
Reference in New Issue
Block a user