diff options
Diffstat (limited to 'backend/drm/atomic.c')
-rw-r--r-- | backend/drm/atomic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index c2005f96..4715c6f0 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -117,7 +117,7 @@ bool create_gamma_lut_blob(struct wlr_drm_backend *drm, return true; } - struct drm_color_lut *gamma = malloc(size * sizeof(struct drm_color_lut)); + struct drm_color_lut *gamma = malloc(size * sizeof(*gamma)); if (gamma == NULL) { wlr_log(WLR_ERROR, "Failed to allocate gamma table"); return false; @@ -133,7 +133,7 @@ bool create_gamma_lut_blob(struct wlr_drm_backend *drm, } if (drmModeCreatePropertyBlob(drm->fd, gamma, - size * sizeof(struct drm_color_lut), blob_id) != 0) { + size * sizeof(*gamma), blob_id) != 0) { wlr_log_errno(WLR_ERROR, "Unable to create gamma LUT property blob"); free(gamma); return false; |