summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/indices/u_primconvert.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c
index eba1f9e4b30..cebb81842d1 100644
--- a/src/gallium/auxiliary/indices/u_primconvert.c
+++ b/src/gallium/auxiliary/indices/u_primconvert.c
@@ -74,6 +74,8 @@ util_primconvert_create(struct pipe_context *pipe, uint32_t primtypes_mask)
void
util_primconvert_destroy(struct primconvert_context *pc)
{
+ if (pc->upload)
+ u_upload_destroy(pc->upload);
util_primconvert_save_index_buffer(pc, NULL);
FREE(pc);
}