aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_realtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_realtime.c')
-rw-r--r--funcs/func_realtime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/funcs/func_realtime.c b/funcs/func_realtime.c
index a45c670d5..866353f55 100644
--- a/funcs/func_realtime.c
+++ b/funcs/func_realtime.c
@@ -86,6 +86,8 @@ static int function_realtime_read(struct ast_channel *chan, const char *cmd, cha
ast_str_append(&out, 0, "%s%s%s%s", var->name, args.delim2, var->value, args.delim1);
ast_copy_string(buf, out->str, len);
+ ast_variables_destroy(head);
+
if (chan)
ast_autoservice_stop(chan);
@@ -223,6 +225,7 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
ast_copy_string(buf, out->str, len);
ast_destroy_realtime(args.family, args.fieldmatch, args.value, NULL);
+ ast_variables_destroy(head);
if (chan)
ast_autoservice_stop(chan);