summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/app_queue.c1
-rw-r--r--res/res_musiconhold.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index b24200c5e..274ae3001 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1362,6 +1362,7 @@ static struct call_queue *load_realtime_queue(const char *queuename)
member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);
if (!member_config) {
ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
+ ast_variables_destroy(queue_vars);
return NULL;
}
}
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 027aed023..985dc80b3 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1108,6 +1108,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
}
}
}
+ ast_variables_destroy(var);
if (ast_strlen_zero(mohclass->dir)) {
if (!strcasecmp(mohclass->mode, "custom")) {
strcpy(mohclass->dir, "nodir");
@@ -1206,7 +1207,8 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
}
- }
+ } else if (var)
+ ast_variables_destroy(var);
}