mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00: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:
committed by
Marge Bot
parent
c5ecfa5eea
commit
9bbba2bccc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user