Check if we have successfully allocated memory. Reviewed-by: Christian König <christian.koe...@amd.com> Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> --- src/gallium/auxiliary/vl/vl_video_buffer.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 3b599fc..e2cac0a 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -492,6 +492,8 @@ vl_video_buffer_create_ex2(struct pipe_context *pipe, unsigned i; buffer = CALLOC_STRUCT(vl_video_buffer); + if (!buffer) + return NULL; buffer->base = *tmpl; buffer->base.context = pipe; -- 1.8.3.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev