xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 11 06:56:11 UTC 2024


 hw/xwayland/xwayland-xtest.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e12d9863fd46698f8904976db7364b62c99daf36
Author: YaoBing Xiao <xiaoyaobing at uniontech.com>
Date:   Fri Oct 11 09:35:18 2024 +0800

    xwayland: prevent potential null pointer dereference
    
    Signed-off-by: YaoBing Xiao <xiaoyaobing at uniontech.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1718>

diff --git a/hw/xwayland/xwayland-xtest.c b/hw/xwayland/xwayland-xtest.c
index 0bb65399b..4198e8d85 100644
--- a/hw/xwayland/xwayland-xtest.c
+++ b/hw/xwayland/xwayland-xtest.c
@@ -362,11 +362,12 @@ setup_ei(ClientPtr client)
     }
 
     xwl_ei_client = calloc(1, sizeof *xwl_ei_client);
-    xwl_ei_client->cmdline = Xstrdup(cmdname);
     if (!xwl_ei_client) {
         error_ei("OOM, cannot setup EI\n");
         goto out;
     }
+
+    xwl_ei_client->cmdline = Xstrdup(cmdname);
     xorg_list_init(&xwl_ei_client->link);
 
     ei = ei_new(NULL);


More information about the xorg-commit mailing list