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:
committed by
Dave Airlie
parent
4bab22bca3
commit
cbf2fb5543
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user