From aa34710bb6975f0ab7f25cb17c4f93366f8f01e1 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sat, 3 Jul 2021 19:36:06 +0900 Subject: [PATCH] gl/context/wgl: Add missing NULL init The value of uninitialized local variable is varying depending on compiler and not guaranteed to be NULL initialized. That results in pointing random address instead of expected function pointer. Part-of: --- gst-libs/gst/gl/wgl/gstglcontext_wgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/wgl/gstglcontext_wgl.c b/gst-libs/gst/gl/wgl/gstglcontext_wgl.c index b24f46c937..200304ee21 100644 --- a/gst-libs/gst/gl/wgl/gstglcontext_wgl.c +++ b/gst-libs/gst/gl/wgl/gstglcontext_wgl.c @@ -493,7 +493,7 @@ load_opengl_dll_module (gpointer user_data) gpointer gst_gl_context_wgl_get_proc_address (GstGLAPI gl_api, const gchar * name) { - gpointer result; + gpointer result = NULL; if (gl_api & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3)) { g_once (&module_opengl_dll_gonce, load_opengl_dll_module, NULL);