Unreference allocated bos in i965 render error paths

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Zdenek Kabelac 2009-04-21 18:51:02 -07:00 committed by Eric Anholt
parent b8b6ca830b
commit fe71217ca8
1 changed files with 4 additions and 1 deletions

View File

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