Commit a46c30c3 authored by Jernej Azarija's avatar Jernej Azarija Committed by Adam Jackson

Bug #12531: RRModesForScreen can fail to allocate.

parent fac7e7e4
......@@ -165,6 +165,8 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret)
int num_screen_modes = 0;
screen_modes = xalloc ((num_modes ? num_modes : 1) * sizeof (RRModePtr));
if (!screen_modes)
return NULL;
/*
* Add modes from all outputs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment