summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2016-07-13 22:50:54 +0100
committerChristian König <[email protected]>2016-07-19 12:41:00 +0200
commit8ba46fbd9ec7a1214882bcfd3de1835a6237b6d1 (patch)
treee27b1e688bc78729b5ec82daddaabccf62749e56 /src/gallium/auxiliary/vl
parent60c7450f16b8275c896103da27a5d4a25ce9be9e (diff)
vl: fix memory leak
CovID: 1363008 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_bicubic_filter.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
index 25bc58c3806..51a0019119a 100644
--- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c
+++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
@@ -242,7 +242,7 @@ vl_bicubic_filter_init(struct vl_bicubic_filter *filter, struct pipe_context *pi
{
struct pipe_rasterizer_state rs_state;
struct pipe_blend_state blend;
- struct vertex2f *offsets = NULL;
+ struct vertex2f offsets[16];
struct pipe_sampler_state sampler;
struct pipe_vertex_element ve;
unsigned i;
@@ -301,10 +301,6 @@ vl_bicubic_filter_init(struct vl_bicubic_filter *filter, struct pipe_context *pi
if (!filter->ves)
goto error_ves;
- offsets = MALLOC(sizeof(struct vertex2f) * 16);
- if (!offsets)
- goto error_offsets;
-
offsets[0].x = -1.0f; offsets[0].y = -1.0f;
offsets[1].x = 0.0f; offsets[1].y = -1.0f;
offsets[2].x = 1.0f; offsets[2].y = -1.0f;
@@ -344,8 +340,6 @@ error_fs:
pipe->delete_vs_state(pipe, filter->vs);
error_vs:
-
-error_offsets:
pipe->delete_vertex_elements_state(pipe, filter->ves);
error_ves: