diff options
author | Niels Ole Salscheider <[email protected]> | 2016-01-29 22:48:57 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-02-02 21:11:15 +0100 |
commit | fb44cfadce97ad99cbca84880c628c8510055438 (patch) | |
tree | 7fc34243d2bccc5cf2c5da62523530b0e4a4877e /src | |
parent | 84a6d2d7d61e5fc5364c58c9a9b90a4705f0ec95 (diff) |
winsys/radeon: Do not deinit the pb cache if it was not initialized
This fixes a crash in pb_cache_release_all_buffers.
Signed-off-by: Niels Ole Salscheider <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 8a1ed3ae08c..4823bf3b6a0 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -742,7 +742,7 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create) ws->fd = dup(fd); if (!do_winsys_init(ws)) - goto fail; + goto fail1; pb_cache_init(&ws->bo_cache, 500000, 2.0f, 0, MIN2(ws->info.vram_size, ws->info.gart_size), @@ -812,8 +812,9 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create) return &ws->base; fail: - pipe_mutex_unlock(fd_tab_mutex); pb_cache_deinit(&ws->bo_cache); +fail1: + pipe_mutex_unlock(fd_tab_mutex); if (ws->surf_man) radeon_surface_manager_free(ws->surf_man); if (ws->fd >= 0) |