Skip to content

XRenderQueryFormats: add missing allocation failure check

Alan Coopersmith requested to merge alanc/libxrender:warnings into master

Most allocations in this function were already checked for failures, but the recently added set had been missed.

Clears 6 warnings from gcc 14.2 of the form:

Xrender.c:361:28: warning: dereference of possibly-NULL ‘format’ [CWE-690]
 [-Wanalyzer-possible-null-dereference]
  361 |         if (xri->format[nf].id == format)
      |             ~~~~~~~~~~~~~~~^~~

Fixes: 01e75461 ("Ensure XRenderInfo pointers are appropriately aligned")
Signed-off-by: Alan Coopersmith

Merge request reports

Loading