timezone: Initialize a local variable
There is a "goto utf16_conv_failed" before in case subkey_w is NULL.
In that case, we're calling g_free() on uninitialized memory.
Fixes this compiler warning:
../subprojects/glib/glib/gtimezone.c:979:3: error: 'subkey_dynamic_w' may be used uninitialized in this function [-Werror=maybe-uninitialized]
979 | g_free (subkey_dynamic_w);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Found in the gtk windows build.
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 7c11873..8ee6186 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -829,7 +829,7 @@
guint rules_num = 0;
RegTZI regtzi, regtzi_prev;
WCHAR winsyspath[MAX_PATH];
- gunichar2 *subkey_w, *subkey_dynamic_w;
+ gunichar2 *subkey_w, *subkey_dynamic_w = NULL;
if (GetSystemDirectoryW (winsyspath, MAX_PATH) == 0)
return 0;