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>
dev
Derek Foreman 7 years ago committed by Daniel Stone
parent 12968e3756
commit cd052a6214
  1. 3
      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);
}

Loading…
Cancel
Save