drm: Don't leak path blob property when updating
authorDaniel Stone <daniels@collabora.com>
Mon, 20 Apr 2015 18:22:52 +0000 (19:22 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 7 May 2015 09:10:58 +0000 (11:10 +0200)
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@collabora.com>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc.c

index 3007b44e6bf4494c36e06f65210efa98ea5b4a86..66671e040ba04295d1bd6d15bf956ceddcd5fbf6 100644 (file)
@@ -4304,6 +4304,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)