projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e59b88
)
u_vbuf: Fix leak
author
Ernestas Kulik
<ernestas.kulik@gmail.com>
Thu, 30 Aug 2018 16:02:45 +0000
(19:02 +0300)
committer
Marek Olšák
<marek.olsak@amd.com>
Tue, 4 Sep 2018 18:01:43 +0000
(14:01 -0400)
Reported by Coverity: data is heap-allocated, but only freed in the
info->index_size != 0 branch.
Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: 18.2 <mesa-stable@lists.freedesktop.org>
src/gallium/auxiliary/util/u_vbuf.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_vbuf.c
b/src/gallium/auxiliary/util/u_vbuf.c
index a7a8a3be21b1088d7751f9dd0485e35ff9736af3..f721613cbc52dc3e124848a09cb90a0cf7d7636b 100644
(file)
--- 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;