[PATCH 3/7] drm: Don't leak path blob property when updating

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

 



Previously, when updating the path blob property, we would leak the
existing one. Make this symmetrical with the tile and EDID blob
pointers.

Signed-off-by: Daniel Stone <daniels@xxxxxxxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxxxx>
---
 drivers/gpu/drm/drm_crtc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index a497c08..aae0d84 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -4302,6 +4302,9 @@ int drm_mode_connector_set_path_property(struct drm_connector *connector,
 	size_t size = strlen(path) + 1;
 	int ret;
 
+	if (connector->path_blob_ptr)
+		drm_property_destroy_blob(dev, connector->path_blob_ptr);
+
 	connector->path_blob_ptr = drm_property_create_blob(connector->dev,
 							    size, path);
 	if (!connector->path_blob_ptr)
-- 
2.3.5

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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