summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_vbuf.c
diff options
context:
space:
mode:
authorErnestas Kulik <[email protected]>2018-08-30 19:02:45 +0300
committerMarek Olšák <[email protected]>2018-09-04 14:01:43 -0400
commitea1e50cc166ae855f9fa91ca6a4f944123298e4e (patch)
tree55d83761b65a90538944a5a2bb74f2726dcac0a7 /src/gallium/auxiliary/util/u_vbuf.c
parent2e59b889033ac927f6ad1fb21a2f9f56648f6d31 (diff)
u_vbuf: Fix leak
Reported by Coverity: data is heap-allocated, but only freed in the info->index_size != 0 branch. Signed-off-by: Ernestas Kulik <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Cc: 18.2 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_vbuf.c')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index a7a8a3be21b..f721613cbc5 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -1334,6 +1334,7 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info)
end_vertex = MAX2(end_vertex, start + count);
end_instance = MAX2(end_instance, start_instance + instance_count);
}
+ free(data);
/* Set the final counts. */
new_info.count = end_vertex - new_info.start;