mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-21 20:35:58 +01:00
backend/drm: Remove erroneous free
init_plane tries to free a single plane on error, but this is an element in a calloc'd array by the caller that we should not touch.
This commit is contained in:
parent
153dea9c28
commit
8dec0f6174
1 changed files with 2 additions and 6 deletions
|
@ -163,13 +163,13 @@ static bool init_plane(struct wlr_drm_backend *drm,
|
||||||
uint64_t blob_id;
|
uint64_t blob_id;
|
||||||
if (!get_drm_prop(drm->fd, p->id, p->props.in_formats, &blob_id)) {
|
if (!get_drm_prop(drm->fd, p->id, p->props.in_formats, &blob_id)) {
|
||||||
wlr_log(WLR_ERROR, "Failed to read IN_FORMATS property");
|
wlr_log(WLR_ERROR, "Failed to read IN_FORMATS property");
|
||||||
goto error;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
drmModePropertyBlobRes *blob = drmModeGetPropertyBlob(drm->fd, blob_id);
|
drmModePropertyBlobRes *blob = drmModeGetPropertyBlob(drm->fd, blob_id);
|
||||||
if (!blob) {
|
if (!blob) {
|
||||||
wlr_log(WLR_ERROR, "Failed to read IN_FORMATS blob");
|
wlr_log(WLR_ERROR, "Failed to read IN_FORMATS blob");
|
||||||
goto error;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
drmModeFormatModifierIterator iter = {0};
|
drmModeFormatModifierIterator iter = {0};
|
||||||
|
@ -199,10 +199,6 @@ static bool init_plane(struct wlr_drm_backend *drm,
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
|
||||||
free(p);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool init_planes(struct wlr_drm_backend *drm) {
|
static bool init_planes(struct wlr_drm_backend *drm) {
|
||||||
|
|
Loading…
Reference in a new issue