aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-17 21:17:20 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-17 21:17:20 +0000
commit59ba2416ac841b063f35c512cd2d7b7fcca09c3b (patch)
tree5aaffac48d2e674845307fb9d4471174aa5867a5 /apps/app_queue.c
parent6452f6efbe8bbfea04196940f6e09d192c0b5cdd (diff)
Merged revisions 165255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines Fix some memory leaks found while looking at how realtime configs are handled. Also cleaned up some coding guidelines violations in app_realtime.c, mostly related to spacing ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165318 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c6
1 files changed, 5 insertions, 1 deletions
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) {