Skip to content

Commit

Permalink
drm/i915/sdvo: Cleanup connector on error path
Browse files Browse the repository at this point in the history
We weren't unlinking the freed connector from the drm lists, and so
hit some use-after-free if we failed to initialise the connector.

Reported-and-tested-by: Woody Suwalski <terraluna977@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18342
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Sep 23, 2010
1 parent 9b74f73 commit 123d5c0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/i915/intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2170,8 +2170,7 @@ intel_sdvo_tv_init(struct intel_sdvo *intel_sdvo, int type)
return true;

err:
intel_sdvo_destroy_enhance_property(connector);
kfree(intel_sdvo_connector);
intel_sdvo_destroy(connector);
return false;
}

Expand Down Expand Up @@ -2243,8 +2242,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
return true;

err:
intel_sdvo_destroy_enhance_property(connector);
kfree(intel_sdvo_connector);
intel_sdvo_destroy(connector);
return false;
}

Expand Down

0 comments on commit 123d5c0

Please sign in to comment.