xserver/hw/xfree86/drivers/modesetting
Alan Coopersmith 6c4c4bbfff modesetting: avoid memory leak when ms_present_check_unflip() returns FALSE
Found by Oracle Parfait 13.3 static analyzer:
   Memory leak [memory-leak]:
      Memory leak of pointer event allocated with calloc(1, 16)
        at line 470 of hw/xfree86/drivers/modesetting/present.c in
	function 'ms_present_unflip'.
          event allocated at line 431 with calloc(1, 16)
          event leaks when ms_present_check_unflip(...) == 0 at line 438
              and i >= config->num_crtc at line 445

Fixes: 13c7d53df ("modesetting: Implement page flipping support for Present.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
(cherry picked from commit bf63d9b34e)
2026-01-25 10:39:58 -08:00
..
dri2.c treewide: mark pGC->ops->CopyArea() calls not using result as void 2026-01-25 10:39:56 -08:00
driver.c xfree86: modesetting: merge FreeRec() into FreeScreen() 2026-01-25 10:39:57 -08:00
driver.h modesetting: Use a more optimal hw cursor size 2023-12-16 08:03:26 +02:00
drmmode_display.c treewide: mark pGC->ops->CopyArea() calls not using result as void 2026-01-25 10:39:56 -08:00
drmmode_display.h modesetting: Use a more optimal hw cursor size 2023-12-16 08:03:26 +02:00
dumb_bo.c modesetting: Include dix-config.h from dumb_bo.c 2015-05-12 08:02:11 -07:00
dumb_bo.h modesetting: Drop dumb_bo::map_count field and dead unmap code. 2014-12-11 11:26:19 -08:00
meson.build build: Switch to meson 0.56 2024-01-08 10:38:05 +00:00
modesetting.man modesetting: Enable TearFree by default 2023-12-17 16:59:57 +00:00
pageflip.c os: move xserver_poll.h into os/ directory 2026-01-25 10:39:54 -08:00
present.c modesetting: avoid memory leak when ms_present_check_unflip() returns FALSE 2026-01-25 10:39:58 -08:00
vblank.c xfree86: modesettig: fix missing include of <errno.h> 2026-01-19 12:32:23 -08:00