diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-06-26 14:44:54 -0500 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2017-07-03 16:41:57 +0100 |
commit | cd052a6214fc5d773f6c3b9c9828f916dfaaf1ad (patch) | |
tree | 301e5e5847226de4d34d9381454983cb13a880f7 /libweston | |
parent | 12968e37567df01f777988ffdeee9cd241493778 (diff) |
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>
Diffstat (limited to 'libweston')
-rw-r--r-- | libweston/linux-dmabuf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |