mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 14:48:03 +02:00
[BSD] Fix lock leak in drm_update_draw malloc failure path.
This commit is contained in:
parent
9a2ae28fbe
commit
cc7ad27fe4
1 changed files with 3 additions and 1 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue