diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-09-28 19:42:36 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-09-28 19:42:36 +0000 |
commit | 82f772cdaf0dda476700db8897967fb7a65b8341 (patch) | |
tree | 6bceb014c39051d0f6c34581cb6cadac5474275d /apps/app_chanisavail.c | |
parent | 85689bc1d84d65244c8fb0e02d0b40d35fd3807e (diff) |
make sure to LOCAL_USER_REMOVE in all cases where the application can exit (issue #5307)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6678 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanisavail.c')
-rwxr-xr-x | apps/app_chanisavail.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c index 791851f08..4e5e52449 100755 --- a/apps/app_chanisavail.c +++ b/apps/app_chanisavail.c @@ -101,6 +101,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data) number = strchr(tech, '/'); if (!number) { ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n"); + LOCAL_USER_REMOVE(u); return -1; } *number = '\0'; @@ -135,8 +136,10 @@ static int chanavail_exec(struct ast_channel *chan, void *data) if (res < 1) { pbx_builtin_setvar_helper(chan, "AVAILCHAN", ""); pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", ""); - if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) + if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) { + LOCAL_USER_REMOVE(u); return -1; + } } LOCAL_USER_REMOVE(u); |