aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-30 15:34:29 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-30 15:34:29 +0000
commit1bcccf83444032d4dbb38f66975946602d4c0aa4 (patch)
treeea52cb2924f0a87741c281c76e597f85a1bee56a /apps
parente3d556380a1423cbbab17a2f610d28441401eab7 (diff)
Fix a crash in app_sms.
Since the data being passed to the generator callback is on the stack of the SMS() application, we must ensure that the generator is stopped before the application exits. ABE-2587 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@289424 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_sms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c
index b1bc84988..412ddb0d6 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -1506,6 +1506,12 @@ static int sms_exec (struct ast_channel *chan, void *data)
sms_log (&h, '?'); /* log incomplete message */
+ /*
+ * The SMS generator data is on the stack. We _MUST_ make sure the generator
+ * is stopped before returning from this function.
+ */
+ ast_deactivate_generator(chan);
+
ast_module_user_remove(u);
return (h.err);
}