[glib/fix-uninitialized-use] timezone: Fix an uninitialized use
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/fix-uninitialized-use] timezone: Fix an uninitialized use
- Date: Fri, 31 Jul 2020 18:05:44 +0000 (UTC)
commit 099297820220a9a22457ee55da6c068db8009cc6
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 31 14:04:21 2020 -0400
timezone: Fix an uninitialized use
GTK ci rightly complains about this when ti builds
GLib as a subproject with -Werror=maybe-uninitialized.
subkey_dynamic_w will be freed without being initialized
when the first goto is taken.
glib/gtimezone.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 7c1187371..8e0621e54 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -831,6 +831,8 @@ rules_from_windows_time_zone (const gchar *identifier,
WCHAR winsyspath[MAX_PATH];
gunichar2 *subkey_w, *subkey_dynamic_w;
+ subkey_dynamic_w = NULL;
+
if (GetSystemDirectoryW (winsyspath, MAX_PATH) == 0)
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]