xaa: avoid possible freed pointer reuse in epilogue
If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps avoid this by clearing the flags in to be destroyed pGCPriv. Reported by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
682c09a2ce
commit
1049139499
|
@ -239,6 +239,7 @@ XAADestroyGC(GCPtr pGC)
|
|||
free(pGCPriv->XAAOps);
|
||||
|
||||
free(pGCPriv->DashPattern);
|
||||
pGCPriv->flags = 0;
|
||||
|
||||
(*pGC->funcs->DestroyGC)(pGC);
|
||||
XAA_GC_FUNC_EPILOGUE (pGC);
|
||||
|
|
Loading…
Reference in New Issue
Block a user