radeon-gallium: If BO allocation fails, return NULL.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 27 Jul 2009 05:35:26 +0000 (22:35 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 27 Jul 2009 05:35:26 +0000 (22:35 -0700)
src/gallium/winsys/drm/radeon/core/radeon_buffer.c

index 684a487f24243fcbd644011e6684fcf80acbdc46..775bda8308f6595d9af1e210783423939b88347a 100644 (file)
@@ -72,6 +72,7 @@ static struct pipe_buffer *radeon_buffer_create(struct pipe_winsys *ws,
             alignment, domain, 0);
     if (radeon_buffer->bo == NULL) {
         FREE(radeon_buffer);
+        return NULL;
     }
     return &radeon_buffer->base;
 }