aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2024-02-22 00:34:41 +0100
committerKenny Levinsen <kl@kl.wtf>2024-02-22 00:41:00 +0100
commit8dec0f61742b805a75af82ad438798762b3e32b5 (patch)
tree253d40fcb626b205e674f131d38ee6ed8951e65c /backend
parent153dea9c28a9a38aef1693774e6eee8bfe226302 (diff)
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.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 6a319635..41a38f6d 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -163,13 +163,13 @@ static bool init_plane(struct wlr_drm_backend *drm,
uint64_t 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");
- goto error;
+ return false;
}
drmModePropertyBlobRes *blob = drmModeGetPropertyBlob(drm->fd, blob_id);
if (!blob) {
wlr_log(WLR_ERROR, "Failed to read IN_FORMATS blob");
- goto error;
+ return false;
}
drmModeFormatModifierIterator iter = {0};
@@ -199,10 +199,6 @@ static bool init_plane(struct wlr_drm_backend *drm,
}
return true;
-
-error:
- free(p);
- return false;
}
static bool init_planes(struct wlr_drm_backend *drm) {