mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-06 00:10:46 +02:00
render: handle -Wanalyzer-null-dereference in AllocateGlyphHash()
Reported in #1817: xwayland-24.1.6/redhat-linux-build/../render/glyph.c:388:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘hashSet’ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2166>
This commit is contained in:
parent
c5ecfa5eea
commit
9bbba2bccc
1 changed files with 2 additions and 0 deletions
|
|
@ -385,6 +385,8 @@ AllocateGlyph(xGlyphInfo * gi, int fdepth)
|
|||
static Bool
|
||||
AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet)
|
||||
{
|
||||
if (hashSet == NULL)
|
||||
return FALSE;
|
||||
hash->table = calloc(hashSet->size, sizeof(GlyphRefRec));
|
||||
if (!hash->table)
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue