The event allocation for ms_do_pageflip is leaked on error because callers of ms_do_pageflip have no way of knowing whether or not a page flip succeeded for any CRTCs. If a page flip succeeded for at least one CRTC, then it's not safe for the caller to free the event allocation, and the allocation won't be leaked. The event allocation is only leaked when not a single CRTC's page flip succeeded. Since all callers of ms_do_pageflip allocate the event pointer, and all of them intentionally leak the event allocation when ms_do_pageflip returns an error, just free the event pointer inside ms_do_pageflip when a page flip doesn't succeed for any CRTC. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Reviewed-by: Martin Roukala <martin.roukala@mupuf.org> |
||
|---|---|---|
| .. | ||
| kdrive | ||
| vfb | ||
| xfree86 | ||
| xnest | ||
| xquartz | ||
| xwayland | ||
| xwin | ||
| meson.build | ||