Closed tautschnig closed 3 years ago
This fixes the case where main
calls intel_hdmi_destroy
which ends up free
ing var_group3
as `connector, but that doesn't seem the only issue here.
When instead main
calls intel_hdmi_get_modes
, it ends up dereferencing uninitialized pointers in the malloc
ed struct, e.g. (struct drm_i915_private *)(connector->dev)->dev_private
.
The pointer var_group3 is eventually passed to
kfree
, and thus needs to point to heap-allocated memory to avoid memory safety issues. See also #1270.