aboutsummaryrefslogtreecommitdiff
path: root/render/egl.c
diff options
context:
space:
mode:
authorIlia Bozhinov <ammen99@gmail.com>2020-12-10 23:25:16 +0100
committerSimon Ser <contact@emersion.fr>2020-12-10 23:29:59 +0100
commit12ede67c62ceab24580d52147354bbc45976129f (patch)
tree73e6aefee803adcd65f443d050e12fea722fd3f6 /render/egl.c
parente9c1f0f7d33ceb5ec36a84ac2b977924562d63af (diff)
egl: fix memory leak
I have noticed this with LeakSanitizer, I hope these are all occurrences.
Diffstat (limited to 'render/egl.c')
-rw-r--r--render/egl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/render/egl.c b/render/egl.c
index 8fe73398..8914801b 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -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;