Selaa lähdekoodia

vmwgfx: Unreference surface on cursor error path

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jakob Bornecrantz 13 vuotta sitten
vanhempi
commit
e5c8dbb814
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

+ 1 - 0
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

@@ -111,6 +111,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
 		if (!ret) {
 			if (!surface->snooper.image) {
 				DRM_ERROR("surface not suitable for cursor\n");
+				vmw_surface_unreference(&surface);
 				return -EINVAL;
 			}
 		} else {