summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_directory.c3
-rw-r--r--apps/app_meetme.c6
-rw-r--r--apps/app_queue.c6
-rw-r--r--apps/app_voicemail.c2
4 files changed, 14 insertions, 3 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 2b0b6776c..fe8139de5 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -437,6 +437,9 @@ static struct ast_config *realtime_directory(char *context)
if (!(cat = ast_category_new(context, "", 99999))) {
ast_log(LOG_WARNING, "Out of memory\n");
ast_config_destroy(cfg);
+ if (rtdata) {
+ ast_config_destroy(rtdata);
+ }
return NULL;
}
ast_category_append(cfg, cat);
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 025ad3561..3ecd0a139 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1812,7 +1812,7 @@ static int rt_extend_conf(char *confno)
char endtime[32];
struct timeval now;
struct ast_tm tm;
- struct ast_variable *var;
+ struct ast_variable *var, *orig_var;
char bookid[8];
if (!extendby) {
@@ -1828,6 +1828,8 @@ static int rt_extend_conf(char *confno)
confno, "startTime<= ", currenttime,
"endtime>= ", currenttime, NULL);
+ origvar = var;
+
/* Identify the specific RealTime conference */
while (var) {
if (!strcasecmp(var->name, "bookid")) {
@@ -1839,7 +1841,7 @@ static int rt_extend_conf(char *confno)
var = var->next;
}
- ast_variables_destroy(var);
+ ast_variables_destroy(orig_var);
ast_strptime(endtime, DATE_FORMAT, &tm);
now = ast_mktime(&tm, NULL);
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 07b7db186..49276ebac 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2205,8 +2205,12 @@ static void leave_queue(struct queue_ent *qe)
/*If the queue is a realtime queue, check to see if it's still defined in real time*/
if (q->realtime) {
- if (!ast_load_realtime("queues", "name", q->name, SENTINEL))
+ struct ast_variable *var;
+ if (!(var = ast_load_realtime("queues", "name", q->name, SENTINEL))) {
q->dead = 1;
+ } else {
+ ast_variables_destroy(var);
+ }
}
if (q->dead) {
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 92fc41d8b..00693f11b 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -9709,6 +9709,8 @@ static char *show_users_realtime(int fd, const char *context)
"=============================================================\n"
"\n");
+ ast_config_destroy(cfg);
+
return CLI_SUCCESS;
}