mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01: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()`
This commit is contained in:
parent
e1ba64c4b7
commit
ed71915742
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++) {
|
for (int i = 0; i < formats_len; i++) {
|
||||||
uint32_t fmt = formats[i];
|
uint32_t fmt = formats[i];
|
||||||
|
|
||||||
uint64_t *modifiers;
|
uint64_t *modifiers = NULL;
|
||||||
EGLBoolean *external_only;
|
EGLBoolean *external_only = NULL;
|
||||||
int modifiers_len = 0;
|
int modifiers_len = 0;
|
||||||
if (!no_modifiers) {
|
if (!no_modifiers) {
|
||||||
modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only);
|
modifiers_len = get_egl_dmabuf_modifiers(egl, fmt, &modifiers, &external_only);
|
||||||
|
|
Loading…
Reference in a new issue