mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 16:40:41 -05:00
kms: Fix drmModeEncoder leak
The result of drmModeGetEncoder() needs to be free'd by the caller. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1020
This commit is contained in:
parent
66fe6d85d0
commit
abc58f7b9d
@ -381,8 +381,11 @@ set_encoder_device_idx_bit (uint32_t *encoder_device_idxs,
|
|||||||
if (drm_encoder->encoder_id == encoder_id)
|
if (drm_encoder->encoder_id == encoder_id)
|
||||||
{
|
{
|
||||||
*encoder_device_idxs |= (1 << i);
|
*encoder_device_idxs |= (1 << i);
|
||||||
|
drmModeFreeEncoder (drm_encoder);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drmModeFreeEncoder (drm_encoder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,6 +424,8 @@ state_set_crtc_state (MetaKmsConnectorState *state,
|
|||||||
|
|
||||||
if (drm_connector->encoder_id == drm_encoder->encoder_id)
|
if (drm_connector->encoder_id == drm_encoder->encoder_id)
|
||||||
state->current_crtc_id = drm_encoder->crtc_id;
|
state->current_crtc_id = drm_encoder->crtc_id;
|
||||||
|
|
||||||
|
drmModeFreeEncoder (drm_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
state->common_possible_crtcs = common_possible_crtcs;
|
state->common_possible_crtcs = common_possible_crtcs;
|
||||||
|
Loading…
Reference in New Issue
Block a user