mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 17:00:13 +01:00
r600/drm: fix segfaults in winsys create failure path
Would try to destroy radeon->cman, radeon->kman both which were still NULL. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
4bab22bca3
commit
cbf2fb5543
1 changed files with 9 additions and 3 deletions
|
|
@ -179,9 +179,15 @@ struct radeon *radeon_decref(struct radeon *radeon)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
radeon->cman->destroy(radeon->cman);
|
||||
radeon->kman->destroy(radeon->kman);
|
||||
drmClose(radeon->fd);
|
||||
if (radeon->cman)
|
||||
radeon->cman->destroy(radeon->cman);
|
||||
|
||||
if (radeon->kman)
|
||||
radeon->kman->destroy(radeon->kman);
|
||||
|
||||
if (radeon->fd >= 0)
|
||||
drmClose(radeon->fd);
|
||||
|
||||
free(radeon);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue