From bc28d46bbbebc644360ab37c255ba555edd7bf7f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 25 Nov 2016 12:05:45 -0500 Subject: [PATCH 1/2] drm_gfx: Fix memory leak in fail case --- gfx/drivers/drm_gfx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index 0cf9aeaeae..3b1eb0c4c2 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -728,6 +728,7 @@ 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 From 918710cb2eca5e0be6010572310f6a7e3c6780e4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 25 Nov 2016 12:19:09 -0500 Subject: [PATCH 2/2] drm_gfx: Fix typo in log message --- gfx/drivers/drm_gfx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index 3b1eb0c4c2..f7a6f158a0 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -732,7 +732,9 @@ static void *drm_gfx_init(const video_info_t *video, 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;