We shouldn't free &modifier_invalid because it wasn't allocated
with malloc()

Signed-off-by: Derek Foreman <[email protected]>
---
 libweston/linux-dmabuf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libweston/linux-dmabuf.c b/libweston/linux-dmabuf.c
index 4f153b1c..ac219ac3 100644
--- a/libweston/linux-dmabuf.c
+++ b/libweston/linux-dmabuf.c
@@ -509,7 +509,8 @@ bind_linux_dmabuf(struct wl_client *client,
                                                          modifier_hi,
                                                          modifier_lo);
                }
-               free(modifiers);
+               if (modifiers != &modifier_invalid)
+                       free(modifiers);
        }
        free(formats);
 }
-- 
2.13.1

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to