lkml.org 
[lkml]   [2017]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] drm: Release memory obtained by kasprintf
Date
Free memory region, if drm_crtc_init_with_planes is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/gpu/drm/drm_crtc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 5af25ce..cd4e628 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -328,6 +328,7 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
ret = drm_crtc_crc_init(crtc);
if (ret) {
drm_mode_object_unregister(dev, &crtc->base);
+ kfree(crtc->name);
return ret;
}

--
1.9.1
\
 
 \ /
  Last update: 2017-09-20 09:27    [W:0.056 / U:1.132 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site