From a46c30c3be33ffb304a885503c8aaa78396ed3d9 Mon Sep 17 00:00:00 2001 From: Jernej Azarija Date: Sun, 18 Nov 2007 11:44:36 -0500 Subject: Bug #12531: RRModesForScreen can fail to allocate. --- randr/rrmode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'randr/rrmode.c') 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 -- cgit v1.2.3