Mesa (master): radeon-gallium: If BO allocation fails, return NULL.

Corbin Simpson csimpson at kemper.freedesktop.org
Mon Jul 27 05:48:55 UTC 2009


Module: Mesa
Branch: master
Commit: 725c1f004c9ec2f7b99146eecf0a35f1b3e54dca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=725c1f004c9ec2f7b99146eecf0a35f1b3e54dca

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sun Jul 26 22:35:26 2009 -0700

radeon-gallium: If BO allocation fails, return NULL.

---

 src/gallium/winsys/drm/radeon/core/radeon_buffer.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
index 684a487..775bda8 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
@@ -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;
 }




More information about the mesa-commit mailing list