diff --git a/main/pbx.c b/main/pbx.c index ae857e9b3658492dbc51953b07cbe4e5f080350b..19db8b2482b352681db46a28764be32976dc33c1 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -9167,6 +9167,8 @@ int ast_build_timing(struct ast_timing *i, const char *info_in) char *info; int j, num_fields, last_sep = -1; + i->timezone = NULL; + /* Check for empty just in case */ if (ast_strlen_zero(info_in)) { return 0; @@ -9186,8 +9188,6 @@ int ast_build_timing(struct ast_timing *i, const char *info_in) /* save the timezone, if it is specified */ if (num_fields == 5) { i->timezone = ast_strdup(info + last_sep + 1); - } else { - i->timezone = NULL; } /* Assume everything except time */ diff --git a/utils/extconf.c b/utils/extconf.c index 80491c016cc9ebf7a3de62fb23e57c8d985e9b24..f62553d0943aef7a5c9ec895d8bef08a6f3c07e9 100644 --- a/utils/extconf.c +++ b/utils/extconf.c @@ -4453,6 +4453,8 @@ int ast_build_timing(struct ast_timing *i, const char *info_in) char *info; int j, num_fields, last_sep = -1; + i->timezone = NULL; + /* Check for empty just in case */ if (ast_strlen_zero(info_in)) { return 0; @@ -4472,8 +4474,6 @@ int ast_build_timing(struct ast_timing *i, const char *info_in) /* save the timezone, if it is specified */ if (num_fields == 5) { i->timezone = ast_strdup(info + last_sep + 1); - } else { - i->timezone = NULL; } /* Assume everything except time */