xserver/hw/xfree86/drivers/modesetting
Alan Coopersmith 309ec5a4a7 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>
(cherry picked from commit bf63d9b34e)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1767>
2025-02-05 15:02:23 +01:00
..
dri2.c dri2: add crocus to the list of va_gl users 2021-12-03 03:10:06 +02:00
driver.c modesetting: Fix dirty updates for sw rotation 2025-02-05 15:02:23 +01:00
driver.h modesetting: Add option for non-vsynced flips for "secondary" outputs. 2021-09-09 09:53:21 +00:00
drmmode_display.c modesetting: Fix dirty updates for sw rotation 2025-02-05 15:02:23 +01:00
drmmode_display.h modesetting: Fix dirty updates for sw rotation 2025-02-05 15:02:23 +01: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
Makefile.am modesetting: Fix broken manpage in autoconf build 2019-10-04 10:29:23 +02:00
meson.build xfree86: Link fb statically 2019-07-23 14:24:00 -04:00
modesetting.man modesetting: Handle mixed VRR and non-VRR display setups better. 2021-10-08 21:37:58 +03:00
pageflip.c modesetting: Add option for non-vsynced flips for "secondary" outputs. 2021-09-09 09:53:21 +00:00
present.c modesetting: avoid memory leak when ms_present_check_unflip() returns FALSE 2025-02-05 15:02:23 +01:00
vblank.c modesetting: Consider RandR primary output for selectioh of sync crtc. 2021-10-08 21:37:59 +03:00