summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_primitive_restart.c4
-rw-r--r--src/mesa/vbo/vbo_rebase.c6
-rw-r--r--src/mesa/vbo/vbo_save_api.c6
3 files changed, 5 insertions, 11 deletions
diff --git a/src/mesa/vbo/vbo_primitive_restart.c b/src/mesa/vbo/vbo_primitive_restart.c
index 0797b5bc84c..6f9d61c9bbc 100644
--- a/src/mesa/vbo/vbo_primitive_restart.c
+++ b/src/mesa/vbo/vbo_primitive_restart.c
@@ -226,8 +226,6 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
}
}
- if (sub_prims) {
- free(sub_prims);
- }
+ free(sub_prims);
}
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c
index 0813f1ccd12..d0bf6c59dc3 100644
--- a/src/mesa/vbo/vbo_rebase.c
+++ b/src/mesa/vbo/vbo_rebase.c
@@ -242,11 +242,9 @@ void vbo_rebase_prims( struct gl_context *ctx,
ctx->Array._DrawArrays = saved_arrays;
ctx->NewDriverState |= ctx->DriverFlags.NewArray;
- if (tmp_indices)
- free(tmp_indices);
+ free(tmp_indices);
- if (tmp_prims)
- free(tmp_prims);
+ free(tmp_prims);
}
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 636aa1fdb7e..f7936610c1c 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1577,10 +1577,8 @@ vbo_destroy_vertex_list(struct gl_context *ctx, void *data)
if (--node->prim_store->refcount == 0)
free(node->prim_store);
- if (node->current_data) {
- free(node->current_data);
- node->current_data = NULL;
- }
+ free(node->current_data);
+ node->current_data = NULL;
}