this needs to be calloced
This commit is contained in:
parent
ad960612ce
commit
bc8390fa6c
|
@ -24,7 +24,7 @@ my_strdup(const char *s)
|
||||||
_EGLDisplay *
|
_EGLDisplay *
|
||||||
_eglNewDisplay(NativeDisplayType displayName)
|
_eglNewDisplay(NativeDisplayType displayName)
|
||||||
{
|
{
|
||||||
_EGLDisplay *dpy = (_EGLDisplay *) malloc(sizeof(_EGLDisplay));
|
_EGLDisplay *dpy = (_EGLDisplay *) calloc(1, sizeof(_EGLDisplay));
|
||||||
if (dpy) {
|
if (dpy) {
|
||||||
dpy->Handle = _eglHashGenKey(_eglGlobal.Displays);
|
dpy->Handle = _eglHashGenKey(_eglGlobal.Displays);
|
||||||
_eglHashInsert(_eglGlobal.Displays, dpy->Handle, dpy);
|
_eglHashInsert(_eglGlobal.Displays, dpy->Handle, dpy);
|
||||||
|
|
Loading…
Reference in New Issue