Kaynağa Gözat

vl/buffer: add sanity check after CALLOC_STRUCT

Check if we have successfully allocated memory.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
tags/mesa-10.1-devel
Emil Velikov 12 yıl önce
ebeveyn
işleme
5354d2e76a
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2
    0
      src/gallium/auxiliary/vl/vl_video_buffer.c

+ 2
- 0
src/gallium/auxiliary/vl/vl_video_buffer.c Dosyayı Görüntüle

@@ -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;

Loading…
İptal
Kaydet