summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-core/drm_drawable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsd-core/drm_drawable.c b/bsd-core/drm_drawable.c
index 7c443522..268b956c 100644
--- 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. */