dereference before null check src/glx/dri2_glx.c:617
Submitted by Vinson Lee
Assigned to Kristian H. Kristensen @krh
Description
mesa: 62f8b56d (master)
617: "pdraw" directly dereferenced 621: "pdraw" null check
Either 617 could be a null dereference or the 621 null check in unnecessary.
src/glx/dri2_glx.c
612 _X_HIDDEN void
613 dri2InvalidateBuffers(Display *dpy, XID drawable)
614 {
615 __GLXDRIdrawable *pdraw =
616 dri2GetGlxDrawableFromXDrawableId(dpy, drawable);
-> 617 struct dri2_screen *psc = (struct dri2_screen *) pdraw->psc;
618 struct dri2_drawable *pdp = (struct dri2_drawable *) pdraw;
619
620 #if __DRI2_FLUSH_VERSION >= 3
-> 621 if (pdraw && psc->f)
622 psc->f->invalidate(pdp->driDrawable);
623 #endif
624 }
Version: git