Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MFC r257869:

drm: Initialize "handle" to 0 before calling drm_gem_handle_create()

This is variable is being checked in drm_gem_name_create() before being
set.

Approved by:	re (delphij)
  • Loading branch information...
commit 6acdccef77ae733482c4dc361a266ebd4c9c5e7c 1 parent faa83dc
@dumbbell dumbbell authored
Showing with 2 additions and 0 deletions.
  1. +1 −0  sys/dev/drm2/drm_crtc.c
  2. +1 −0  sys/dev/drm2/radeon/radeon_gem.c
View
1  sys/dev/drm2/drm_crtc.c
@@ -2317,6 +2317,7 @@ int drm_mode_getfb(struct drm_device *dev,
r->depth = fb->depth;
r->bpp = fb->bits_per_pixel;
r->pitch = fb->pitches[0];
+ r->handle = 0;
fb->funcs->create_handle(fb, file_priv, &r->handle);
out:
View
1  sys/dev/drm2/radeon/radeon_gem.c
@@ -567,6 +567,7 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,
if (r)
return -ENOMEM;
+ handle = 0;
r = drm_gem_handle_create(file_priv, gobj, &handle);
/* drop reference from allocate - handle holds it now */
drm_gem_object_unreference_unlocked(gobj);
Please sign in to comment.
Something went wrong with that request. Please try again.