linux-dmabuf: Fix crash with no valid modifiers

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

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Derek Foreman 2017-06-26 14:44:54 -05:00 committed by Daniel Stone
parent 12968e3756
commit cd052a6214

View File

@ -509,6 +509,7 @@ bind_linux_dmabuf(struct wl_client *client,
modifier_hi,
modifier_lo);
}
if (modifiers != &modifier_invalid)
free(modifiers);
}
free(formats);