OSDN Git Service
(root)
/
android-x86
/
external-libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a2ae28
)
[BSD] Fix lock leak in drm_update_draw malloc failure path.
author
Owain Ainsworth
<oga@stephanie.cybernetseraph.org>
Tue, 27 May 2008 22:11:25 +0000
(15:11 -0700)
committer
Eric Anholt
<eric@anholt.net>
Tue, 27 May 2008 22:11:25 +0000
(15:11 -0700)
bsd-core/drm_drawable.c
patch
|
blob
|
history
diff --git
a/bsd-core/drm_drawable.c
b/bsd-core/drm_drawable.c
index
7c44352
..
268b956
100644
(file)
--- a/
bsd-core/drm_drawable.c
+++ b/
bsd-core/drm_drawable.c
@@
-136,8
+136,10
@@
int drm_update_draw(struct drm_device *dev, void *data,
if (info->rects == NULL) {
info->rects = drm_alloc(sizeof(*info->rects) *
update->num, DRM_MEM_DRAWABLE);
- if (info->rects == NULL)
+ if (info->rects == NULL) {
+ DRM_SPINUNLOCK(&dev->drw_lock);
return ENOMEM;
+ }
info->num_rects = update->num;
}
/* For some reason the pointer arg is unsigned long long. */