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>
This commit is contained in:
parent
03224f492d
commit
2108caac25
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue