aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Lane <iain.lane@canonical.com>2014-04-08 11:23:02 +0100
committerIain Lane <iain.lane@canonical.com>2014-04-08 11:23:02 +0100
commitbaf429be157b26f9a3126914a71a77f53afad411 (patch)
tree862ba3da01c9bf8834f8602f84ab6ac1eae7428c
parent56ae922cfef53add0f26ed3979b0cd97caa50f86 (diff)
downloadayatana-indicator-datetime-baf429be157b26f9a3126914a71a77f53afad411.tar.gz
ayatana-indicator-datetime-baf429be157b26f9a3126914a71a77f53afad411.tar.bz2
ayatana-indicator-datetime-baf429be157b26f9a3126914a71a77f53afad411.zip
split_settings_location: Initialise the 'first' pointer.
Otherwise it points to random memory which leads to undefined behaviour.
-rw-r--r--src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index e6d5194..d1c69a2 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -52,7 +52,7 @@ split_settings_location(const gchar* location, gchar** zone, gchar** name)
if(location_dup != NULL)
g_strstrip(location_dup);
- gchar* first;
+ gchar* first = NULL;
if(location_dup && (first = strchr(location_dup, ' ')))
*first = '\0';