diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-23 11:15:21 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-23 12:13:33 -0400 |
commit | 123d5c0197d8333c3f5cb9572a0c8299dc611233 (patch) | |
tree | 7a6fb7c4843574339f4be66c16a51f21a0d8b7b2 /drivers | |
parent | 9b74f7348f214b1f99819f0d0da4a1cbabb1e740 (diff) |
drm/i915/sdvo: Cleanup connector on error path
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index e8e902d614ed..60fcef700be6 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -2170,8 +2170,7 @@ intel_sdvo_tv_init(struct intel_sdvo *intel_sdvo, int type) | |||
2170 | return true; | 2170 | return true; |
2171 | 2171 | ||
2172 | err: | 2172 | err: |
2173 | intel_sdvo_destroy_enhance_property(connector); | 2173 | intel_sdvo_destroy(connector); |
2174 | kfree(intel_sdvo_connector); | ||
2175 | return false; | 2174 | return false; |
2176 | } | 2175 | } |
2177 | 2176 | ||
@@ -2243,8 +2242,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device) | |||
2243 | return true; | 2242 | return true; |
2244 | 2243 | ||
2245 | err: | 2244 | err: |
2246 | intel_sdvo_destroy_enhance_property(connector); | 2245 | intel_sdvo_destroy(connector); |
2247 | kfree(intel_sdvo_connector); | ||
2248 | return false; | 2246 | return false; |
2249 | } | 2247 | } |
2250 | 2248 | ||