diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-05-10 16:02:07 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-05-11 03:51:01 -0400 |
commit | b45396c790277f3527425bf60c9f27718edf25c8 (patch) | |
tree | 07eedbfbccd2469f2cf50b5476c47bc741e66dce /render/drm_format_set.c | |
parent | e353c5c63175c6b3abcbf588aa29285d09817fa4 (diff) |
wlr_drm_format: Introduce drm_format_finish
Diffstat (limited to 'render/drm_format_set.c')
-rw-r--r-- | render/drm_format_set.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/render/drm_format_set.c b/render/drm_format_set.c index 8f3aea99..280d6465 100644 --- a/render/drm_format_set.c +++ b/render/drm_format_set.c @@ -8,8 +8,13 @@ #include <wlr/util/log.h> #include "render/drm_format_set.h" +void wlr_drm_format_finish(struct wlr_drm_format *format) { + // For later +} + void wlr_drm_format_set_finish(struct wlr_drm_format_set *set) { for (size_t i = 0; i < set->len; ++i) { + wlr_drm_format_finish(set->formats[i]); free(set->formats[i]); } free(set->formats); @@ -60,6 +65,7 @@ bool wlr_drm_format_set_add(struct wlr_drm_format_set *set, uint32_t format, return false; } if (!wlr_drm_format_add(&fmt, modifier)) { + wlr_drm_format_finish(fmt); return false; } @@ -196,6 +202,7 @@ struct wlr_drm_format *wlr_drm_format_intersect( // If the intersection is empty, then the formats aren't compatible with // each other. if (format->len == 0) { + wlr_drm_format_set_finish(format); free(format); return NULL; } |