summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_state_vertex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_vertex.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_vertex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index e7dc3d002b..a151758ddc 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -43,7 +43,7 @@ softpipe_create_vertex_elements_state(struct pipe_context *pipe,
{
struct sp_velems_state *velems;
assert(count <= PIPE_MAX_ATTRIBS);
- velems = (struct sp_velems_state *) MALLOC(sizeof(struct sp_velems_state) + count * sizeof(*attribs));
+ velems = (struct sp_velems_state *) MALLOC(sizeof(struct sp_velems_state));
if (velems) {
velems->count = count;
memcpy(velems->velem, attribs, sizeof(*attribs) * count);