X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fxorg%2Fxorg_crtc.c;h=82dae194c4bd434f478849d036674895907605b2;hb=a087eb590d780cb82b49464e05ffc85123adce7e;hp=03bc6e37c9ced2cbb3c0445806d6d1a380494c71;hpb=9c6a9363ef96c00dd0ad63e340b32479e43fea45;p=mesa.git diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c index 03bc6e37c9c..82dae194c4b 100644 --- a/src/gallium/state_trackers/xorg/xorg_crtc.c +++ b/src/gallium/state_trackers/xorg/xorg_crtc.c @@ -256,7 +256,7 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image) return; err_bo_destroy: - kms_bo_destroy(crtcp->cursor_bo); + kms_bo_destroy(&crtcp->cursor_bo); } #endif @@ -304,10 +304,8 @@ xorg_crtc_cursor_destroy(xf86CrtcPtr crtc) pipe_texture_reference(&crtcp->cursor_tex, NULL); #ifdef HAVE_LIBKMS if (crtcp->cursor_bo) - kms_bo_destroy(crtcp->cursor_bo); + kms_bo_destroy(&crtcp->cursor_bo); #endif - - xfree(crtcp); } /* @@ -319,11 +317,12 @@ crtc_destroy(xf86CrtcPtr crtc) { struct crtc_private *crtcp = crtc->driver_private; - if (crtcp->cursor_tex) - pipe_texture_reference(&crtcp->cursor_tex, NULL); + xorg_crtc_cursor_destroy(crtc); drmModeFreeCrtc(crtcp->drm_crtc); + xfree(crtcp); + crtc->driver_private = NULL; } static const xf86CrtcFuncsRec crtc_funcs = {