Avoid possible null pointer dereference.
Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
437d2ec5f2
commit
f27d743c18
|
@ -513,9 +513,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
int ret, bpc, green_bpc, i;
|
||||
|
||||
xwl_screen = calloc(sizeof *xwl_screen, 1);
|
||||
xwl_screen->wm_fd = -1;
|
||||
if (xwl_screen == NULL)
|
||||
return FALSE;
|
||||
xwl_screen->wm_fd = -1;
|
||||
|
||||
if (!dixRegisterPrivateKey(&xwl_screen_private_key, PRIVATE_SCREEN, 0))
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue
Block a user