aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 aee2fa6c5..b5c471b8e 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -2040,6 +2040,12 @@ static int sms_exec(struct ast_channel *chan, const char *data)
}
res = h.err; /* XXX */
+ /*
+ * 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);
+
sms_log(&h, '?'); /* log incomplete message */
done:
return (res);