diff options
author | Zdenek Kabelac <zdenek.kabelac@gmail.com> | 2009-04-21 18:51:02 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-21 19:54:14 -0700 |
commit | fe71217ca86eb7ae8081bf3e26d30f2002d27691 (patch) | |
tree | e80d0e493ae249de3f3f48adc47f0c3983e8b8da /src/i965_render.c | |
parent | b8b6ca830b1fd6956c76a5417462ca55174cb881 (diff) |
Unreference allocated bos in i965 render error paths
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/i965_render.c')
-rw-r--r-- | src/i965_render.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index 704db975..e527f11c 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1285,8 +1285,10 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, surface_state_bo = dri_bo_alloc(pI830->bufmgr, "surface_state", 3 * sizeof (brw_surface_state_padded), 4096); - if (dri_bo_map(surface_state_bo, 1) != 0) + if (dri_bo_map(surface_state_bo, 1) != 0) { + dri_bo_unreference(surface_state_bo); return FALSE; + } /* Set up the state buffer for the destination surface */ i965_set_picture_surface_state(surface_state_bo, 0, pDstPicture, pDst, TRUE); @@ -1305,6 +1307,7 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, binding_table_bo = dri_bo_alloc(pI830->bufmgr, "binding_table", 3 * sizeof(uint32_t), 4096); if (dri_bo_map (binding_table_bo, 1) != 0) { + dri_bo_unreference(binding_table_bo); dri_bo_unreference(surface_state_bo); return FALSE; } |