From: Dave Airlie Date: Fri, 23 Dec 2005 08:17:44 +0000 (+0000) Subject: this needs to be calloced X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc8390fa6cb748061ab325b789b828436eac7c5d;p=mesa.git this needs to be calloced --- diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 669a4d50841..074a85bf26b 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -24,7 +24,7 @@ my_strdup(const char *s) _EGLDisplay * _eglNewDisplay(NativeDisplayType displayName) { - _EGLDisplay *dpy = (_EGLDisplay *) malloc(sizeof(_EGLDisplay)); + _EGLDisplay *dpy = (_EGLDisplay *) calloc(1, sizeof(_EGLDisplay)); if (dpy) { dpy->Handle = _eglHashGenKey(_eglGlobal.Displays); _eglHashInsert(_eglGlobal.Displays, dpy->Handle, dpy);