xwayland: prevent potential null pointer dereference
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1718>
This commit is contained in:
parent
728b54528d
commit
e12d9863fd
|
@ -362,11 +362,12 @@ setup_ei(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
xwl_ei_client = calloc(1, sizeof *xwl_ei_client);
|
xwl_ei_client = calloc(1, sizeof *xwl_ei_client);
|
||||||
xwl_ei_client->cmdline = Xstrdup(cmdname);
|
|
||||||
if (!xwl_ei_client) {
|
if (!xwl_ei_client) {
|
||||||
error_ei("OOM, cannot setup EI\n");
|
error_ei("OOM, cannot setup EI\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xwl_ei_client->cmdline = Xstrdup(cmdname);
|
||||||
xorg_list_init(&xwl_ei_client->link);
|
xorg_list_init(&xwl_ei_client->link);
|
||||||
|
|
||||||
ei = ei_new(NULL);
|
ei = ei_new(NULL);
|
||||||
|
|
Loading…
Reference in New Issue