summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-04-30 22:29:17 -0400
committerIlia Mirkin <[email protected]>2016-05-01 11:19:08 -0400
commitad545d179bf56312d9d655a0a672af3732e43365 (patch)
treef3c2186560617d662c11767d7985edf7f291e8fa
parent23cf24e227cce9d71e2a7d206133d4094b2c2e1f (diff)
vbo: avoid leaking prim on vbo bind failure
Spotted by Coverity Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Vinson Lee <[email protected]>
-rw-r--r--src/mesa/vbo/vbo_exec_array.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 2d35f5a43ac..3b45eb5d09f 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1138,8 +1138,10 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
return;
}
- if (!vbo_bind_arrays(ctx))
+ if (!vbo_bind_arrays(ctx)) {
+ free(prim);
return;
+ }
min_index_ptr = (uintptr_t)indices[0];
max_index_ptr = 0;