mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/egl: fix uninitialized pointers in init_dmabuf_formats
`modifiers` and `external_only` are never initialized, and free'd later. This
commit explicitly initializes them to NULL to prevent segfaults on `free()`
(cherry picked from commit ed71915742)
This commit is contained in:
parent
1712a7d274
commit
bc6422115c
1 changed files with 2 additions and 2 deletions
|
|
@ -124,8 +124,8 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
|||
for (int i = 0; i < formats_len; i++) {
|
||||
uint32_t fmt = formats[i];
|
||||
|
||||
uint64_t *modifiers;
|
||||
EGLBoolean *external_only;
|
||||
uint64_t *modifiers = NULL;
|
||||
EGLBoolean *external_only = NULL;
|
||||
int modifiers_len = 0;
|
||||
if (!no_modifiers) {
|
||||
modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue