Commit 18692160 authored by Keith Packard's avatar Keith Packard
Browse files

kdrive: make sure allocation worked before accessing

parent d6e151ce
......@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.6 2000/08/26 00:24:37 keithp Exp $ */
/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.7 2000/09/15 15:18:59 keithp Exp $ */
#include "kdrive.h"
#ifdef PSEUDO8
......@@ -465,9 +465,9 @@ KdAllocatePrivates (ScreenPtr pScreen)
kdGeneration = serverGeneration;
}
pScreenPriv = (KdPrivScreenPtr) xalloc(sizeof (*pScreenPriv));
memset (pScreenPriv, '\0', sizeof (KdPrivScreenRec));
if (!pScreenPriv)
return FALSE;
memset (pScreenPriv, '\0', sizeof (KdPrivScreenRec));
KdSetScreenPriv (pScreen, pScreenPriv);
return TRUE;
}
......
Supports Markdown
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