diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-06-21 04:37:43 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-06-21 04:37:43 +0000 |
commit | a494c07d3e7f324c9cfe367e5466ff5b55ada744 (patch) | |
tree | d0f96586f05ce865195d650599dbfd9b454afb0a /sys/dev/pci/drm | |
parent | e2ae34c01f91a25136f18433866dc6504eac5538 (diff) |
drm/radeon: memory leak on bo reservation failure. v2
From Quentin Casasnovas
2b9149f17e7135c31c9df1c80ab6d912c4265126 in ubuntu 3.8
74073c9dd29905645feb6dee03c144657a9844cd in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_kms.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c index d3ef5880775..922c929b888 100644 --- a/sys/dev/pci/drm/radeon/radeon_kms.c +++ b/sys/dev/pci/drm/radeon/radeon_kms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_kms.c,v 1.27 2014/04/07 06:43:11 jsg Exp $ */ +/* $OpenBSD: radeon_kms.c,v 1.28 2014/06/21 04:37:42 jsg Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -1112,8 +1112,11 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) radeon_vm_init(rdev, &fpriv->vm); r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false); - if (r) + if (r) { + radeon_vm_fini(rdev, &fpriv->vm); + kfree(fpriv); return r; + } /* map the ib pool buffer read only into * virtual address space */ |