aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render/drm_format_set.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/render/drm_format_set.c b/render/drm_format_set.c
index 1b837fa5..e24152f6 100644
--- a/render/drm_format_set.c
+++ b/render/drm_format_set.c
@@ -74,6 +74,7 @@ bool wlr_drm_format_set_add(struct wlr_drm_format_set *set, uint32_t format,
struct wlr_drm_format *fmts = realloc(set->formats, sizeof(*fmts) * capacity);
if (!fmts) {
wlr_log_errno(WLR_ERROR, "Allocation failed");
+ wlr_drm_format_finish(&fmt);
return false;
}