summaryrefslogtreecommitdiff
path: root/funcs/func_logic.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-12-16 22:57:17 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-12-16 22:57:17 +0000
commit27cbfc1bd5b0f80de5d5968c8b1965c2252b23c1 (patch)
tree3089c4dfcc98bd2d830466643da0f5f1a65c24f2 /funcs/func_logic.c
parent91b4a30be827ccb8f71660394ea4e6b21e885814 (diff)
Add timezone to the possible fields in a timespec.
(closes issue #14028) Reported by: mostyn Patches: timezone-v2.patch uploaded by mostyn (license 398) (with additional code guideline fixes and a memory leak fix by me - license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_logic.c')
-rw-r--r--funcs/func_logic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/funcs/func_logic.c b/funcs/func_logic.c
index ef644f43f..e583d5439 100644
--- a/funcs/func_logic.c
+++ b/funcs/func_logic.c
@@ -148,6 +148,7 @@ static int iftime(struct ast_channel *chan, const char *cmd, char *data, char *b
if (!ast_build_timing(&timing, expr)) {
ast_log(LOG_WARNING, "Invalid Time Spec.\n");
+ ast_destroy_timing(&timing);
return -1;
}
@@ -157,6 +158,7 @@ static int iftime(struct ast_channel *chan, const char *cmd, char *data, char *b
iffalse = ast_strip_quoted(iffalse, "\"", "\"");
ast_copy_string(buf, ast_check_timing(&timing) ? iftrue : iffalse, len);
+ ast_destroy_timing(&timing);
return 0;
}