diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2024-01-17 01:55:01 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-01-17 15:44:37 +0000 |
commit | 20b99ed85434837f31107337631f003de235b4d4 (patch) | |
tree | fc75a5e34ba0369b94dd9949f0c04031129c4d9d | |
parent | 3eb89e53252d3d4ce164f3a9abb99231f280240d (diff) |
render/drm_format_set: fix possible leak on realloc error
-rw-r--r-- | render/drm_format_set.c | 1 |
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; } |