Skip to content

Commit

Permalink
drm: Don't leak path blob property when updating
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Stone authored and Daniel Vetter committed May 7, 2015
1 parent 9b0adc2 commit 4339ed8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4339ed8

Please sign in to comment.