<div dir="ltr"><pre class="" style="overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:9.5px;margin-top:0px;margin-bottom:10px;line-height:14.3px;color:rgb(51,51,51);word-wrap:break-word;border:0px;border-radius:0px"><span class="" style="">Reviewed-by: Nayan Deshmukh <<a href="mailto:nayan26deshmukh@gmail.com">nayan26deshmukh@gmail.com</a>></span></pre><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 14, 2016 at 3:20 AM, Eric Engestrom <span dir="ltr"><<a href="mailto:eric@engestrom.ch" target="_blank">eric@engestrom.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">CovID: 1363008<br>
Signed-off-by: Eric Engestrom <<a href="mailto:eric@engestrom.ch">eric@engestrom.ch</a>><br>
---<br>
<br>
</span>v2: avoid using malloc() altogether (Christian König)<br>
<br>
---<br>
 src/gallium/auxiliary/vl/vl_bicubic_filter.c | 8 +-------<br>
 1 file changed, 1 insertion(+), 7 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c<br>
index 25bc58c..51a0019 100644<br>
--- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c<br>
+++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c<br>
@@ -242,7 +242,7 @@ vl_bicubic_filter_init(struct vl_bicubic_filter *filter, struct pipe_context *pi<br>
 {<br>
    struct pipe_rasterizer_state rs_state;<br>
    struct pipe_blend_state blend;<br>
-   struct vertex2f *offsets = NULL;<br>
+   struct vertex2f offsets[16];<br>
    struct pipe_sampler_state sampler;<br>
    struct pipe_vertex_element ve;<br>
    unsigned i;<br>
@@ -301,10 +301,6 @@ vl_bicubic_filter_init(struct vl_bicubic_filter *filter, struct pipe_context *pi<br>
    if (!filter->ves)<br>
       goto error_ves;<br>
<br>
-   offsets = MALLOC(sizeof(struct vertex2f) * 16);<br>
-   if (!offsets)<br>
-      goto error_offsets;<br>
-<br>
    offsets[0].x = -1.0f; offsets[0].y = -1.0f;<br>
    offsets[1].x = 0.0f; offsets[1].y = -1.0f;<br>
    offsets[2].x = 1.0f; offsets[2].y = -1.0f;<br>
@@ -344,8 +340,6 @@ vl_bicubic_filter_init(struct vl_bicubic_filter *filter, struct pipe_context *pi<br>
<span class="">    pipe->delete_vs_state(pipe, filter->vs);<br>
<br>
 error_vs:<br>
</span>-<br>
-error_offsets:<br>
    pipe->delete_vertex_elements_state(pipe, filter->ves);<br>
<br>
 error_ves:<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.0<br>
<br>
</font></span></blockquote></div><br></div></div>