diff options
author | Iain Lane <iain.lane@canonical.com> | 2014-04-08 11:23:02 +0100 |
---|---|---|
committer | Iain Lane <iain.lane@canonical.com> | 2014-04-08 11:23:02 +0100 |
commit | baf429be157b26f9a3126914a71a77f53afad411 (patch) | |
tree | 862ba3da01c9bf8834f8602f84ab6ac1eae7428c | |
parent | 56ae922cfef53add0f26ed3979b0cd97caa50f86 (diff) | |
download | ayatana-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.c | 2 |
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'; |