summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/egl/main/eglcontext.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 99d1c3e7595..79a92c7c4a6 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -366,8 +366,7 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
return EGL_FALSE;
}
- memset(ctx, 0, sizeof(_EGLContext));
- _eglInitResource(&ctx->Resource, sizeof(_EGLResource), dpy);
+ _eglInitResource(&ctx->Resource, sizeof(*ctx), dpy);
ctx->ClientAPI = api;
ctx->Config = conf;
ctx->WindowRenderBuffer = EGL_NONE;