mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 07:38:22 +02:00
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>
(cherry picked from commit 1049139499)
This commit is contained in:
parent
befa8a3b83
commit
df16b789aa
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue