diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-17 21:25:32 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-17 21:25:32 +0000 |
commit | 0262af796c01510ae1fd79e3044f0706650c3259 (patch) | |
tree | 5141e8975dccdfa48c563e1945ea6866de78ad75 /apps | |
parent | 1719f54a06233a2b8d507a8887bc0ee5359b8221 (diff) |
Merged revisions 165318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r165318 | mmichelson | 2008-12-17 15:17:20 -0600 (Wed, 17 Dec 2008) | 15 lines
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/branches/1.6.1@165324 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_directory.c | 3 | ||||
-rw-r--r-- | apps/app_queue.c | 6 | ||||
-rw-r--r-- | apps/app_voicemail.c | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index fb2c4783c..ded4b85bf 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -383,6 +383,9 @@ static struct ast_config *realtime_directory(char *context) if (!cat) { 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_queue.c b/apps/app_queue.c index 88a99bf1c..68023b183 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2032,8 +2032,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 7eff59772..08cefadf3 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -9610,6 +9610,8 @@ static char *show_users_realtime(int fd, const char *context) "=============================================================\n" "\n"); + ast_config_destroy(cfg); + return CLI_SUCCESS; } |