projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fa1953
)
drm/qxl: Do not leak memory if qxl_release_list_add fails
author
Frediano Ziglio
<
[email protected]
>
Wed, 3 Jun 2015 11:09:10 +0000
(12:09 +0100)
committer
Dave Airlie
<
[email protected]
>
Fri, 5 Jun 2015 01:00:37 +0000
(11:00 +1000)
If the function fails reference counter to the object is not decremented
causing leaks.
This is hard to spot as it happens only on very low memory situations.
Signed-off-by: Frediano Ziglio <
[email protected]
>
Cc:
[email protected]
Reviewed-by: Dave Airlie <
[email protected]
>
Signed-off-by: Dave Airlie <
[email protected]
>
drivers/gpu/drm/qxl/qxl_ioctl.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/qxl/qxl_ioctl.c
b/drivers/gpu/drm/qxl/qxl_ioctl.c
index b110883f8253dc272498abb64b4c408146519930..7354a4cda59d95aa17e6704602ca2aaa49c0e36d 100644
(file)
--- a/
drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/
drivers/gpu/drm/qxl/qxl_ioctl.c
@@
-122,8
+122,10
@@
static struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
qobj = gem_to_qxl_bo(gobj);
ret = qxl_release_list_add(release, qobj);
- if (ret)
+ if (ret) {
+ drm_gem_object_unreference_unlocked(gobj);
return NULL;
+ }
return qobj;
}