summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-07-03 19:36:06 +0900
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-07-03 11:40:25 +0000
commitaa34710bb6975f0ab7f25cb17c4f93366f8f01e1 (patch)
tree23d7c9f5b40997800cdeb966c2486e030450625f
parent6389eef70de782fc145b9a43233d3b41b978e675 (diff)
downloadgstreamer-plugins-base-aa34710bb6975f0ab7f25cb17c4f93366f8f01e1.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1222>
-rw-r--r--gst-libs/gst/gl/wgl/gstglcontext_wgl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/wgl/gstglcontext_wgl.c b/gst-libs/gst/gl/wgl/gstglcontext_wgl.c
index b24f46c93..200304ee2 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);