diff options
author | Eric Anholt <eric@anholt.net> | 2014-06-16 08:06:53 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-06-23 14:51:56 -0700 |
commit | 0d9ad781807022d78239327ed508758a3f88b090 (patch) | |
tree | 5410f65e20d2346294d45433ce40bf83b7db46a5 | |
parent | 736bed2aaf4bb672b6c7b33146fe84700baf22bd (diff) |
glamor: Fix GLES2 non-VBO temporary memory allocation.
We'd get a request for like 16 bytes, claim to have allocated
GLAMOR_VBO_SIZE, and then not reallocate when something a request
bigger than 16 came along. The intent was to always allocate at least
GLAMOR_VBO_SIZE.
Fixes segfaults with Xephyr -glamor_gles2 and running gnome-terminal.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | glamor/glamor_vbo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glamor/glamor_vbo.c b/glamor/glamor_vbo.c index c6785594b..e90610102 100644 --- a/glamor/glamor_vbo.c +++ b/glamor/glamor_vbo.c @@ -119,7 +119,7 @@ glamor_get_vbo_space(ScreenPtr screen, unsigned size, char **vbo_offset) if (glamor_priv->vbo_size < size) { glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size); free(glamor_priv->vb); - glamor_priv->vb = XNFalloc(size); + glamor_priv->vb = XNFalloc(glamor_priv->vbo_size); } *vbo_offset = NULL; /* We point to the start of glamor_priv->vb every time, and |