summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2010-09-10 15:20:15 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2010-09-16 11:07:32 +0200
commit2108caac25b375cfa6943fcc6a6386b9a8d4655e (patch)
tree443476d528f9b4f900ea89bd2a8da15c9191da85 /src/gallium
parent03224f492dc9cee179ff9ed961be0443a3669dd1 (diff)
r600g: Fixed a bo leak in r600_blit_state_ps_shader().
We would leak the newly created bo if it cannot be mapped. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index e6ded342e5..e6b3be6d3b 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -335,10 +335,10 @@ static void r600_blit_state_ps_shader(struct r600_screen *rscreen, struct radeon
/* simple shader */
bo = radeon_bo(rscreen->rw, 0, 128, 4096, NULL);
if (bo == NULL) {
- radeon_bo_decref(rscreen->rw, bo);
return;
}
if (radeon_bo_map(rscreen->rw, bo)) {
+ radeon_bo_decref(rscreen->rw, bo);
return;
}
switch (rscreen->chip_class) {