mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-19 14:48:30 +02:00
dix: CreateScratchGC: avoid dereference of pointer we just set to NULL
Clears warning from gcc 14.1: ../dix/gc.c: In function ‘CreateScratchGC’: ../dix/gc.c:818:28: warning: dereference of NULL ‘pGC’ [CWE-476] [-Wanalyzer-null-dereference] 818 | pGC->graphicsExposures = FALSE; Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
This commit is contained in:
parent
0cb826e3d0
commit
7ee3a52018
1 changed files with 2 additions and 1 deletions
3
dix/gc.c
3
dix/gc.c
|
|
@ -815,7 +815,8 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
|||
FreeGC(pGC, (XID) 0);
|
||||
pGC = (GCPtr) NULL;
|
||||
}
|
||||
pGC->graphicsExposures = FALSE;
|
||||
else
|
||||
pGC->graphicsExposures = FALSE;
|
||||
return pGC;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue