mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
egl: fix memory leak
I have noticed this with LeakSanitizer, I hope these are all occurrences.
This commit is contained in:
parent
e9c1f0f7d3
commit
12ede67c62
1 changed files with 2 additions and 0 deletions
|
@ -166,6 +166,7 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
|||
}
|
||||
|
||||
free(modifiers);
|
||||
free(external_only);
|
||||
}
|
||||
|
||||
char *str_formats = malloc(formats_len * 5 + 1);
|
||||
|
@ -783,6 +784,7 @@ static int get_egl_dmabuf_modifiers(struct wlr_egl *egl, int format,
|
|||
*modifiers, *external_only, &num)) {
|
||||
wlr_log(WLR_ERROR, "Failed to query dmabuf modifiers");
|
||||
free(*modifiers);
|
||||
free(*external_only);
|
||||
return -1;
|
||||
}
|
||||
return num;
|
||||
|
|
Loading…
Reference in a new issue