[PATCH 2/2] drm: Release memory obtained by kasprintf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Free memory region, if drm_crtc_init_with_planes is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux