提交 123d5c01 编写于 作者: C Chris Wilson

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: NWoody Suwalski <terraluna977@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18342Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
上级 9b74f734
......@@ -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;
}
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册