diff options
author | Jernej Azarija <azi.stdout@gmail.com> | 2007-11-18 11:44:36 -0500 |
---|---|---|
committer | Adam Jackson <ajax@aspartame.nwnk.net> | 2007-11-18 11:45:13 -0500 |
commit | a46c30c3be33ffb304a885503c8aaa78396ed3d9 (patch) | |
tree | 8590abd2feec2e46273d6a89a740f608494a686d /randr/rrmode.c | |
parent | fac7e7e4e1809e865b9b3cf5b7eb69ba9d3a3759 (diff) |
Bug #12531: RRModesForScreen can fail to allocate.
Diffstat (limited to 'randr/rrmode.c')
-rw-r--r-- | randr/rrmode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/randr/rrmode.c b/randr/rrmode.c index 11175810c..f060d2294 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -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 |