summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/pbx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index d0ca80d46..6f67abaea 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3970,8 +3970,10 @@ static void pbx_substitute_variables(char *passdata, int datalen, struct ast_cha
const char *tmp;
/* Nothing more to do */
- if (!e->data)
+ if (!e->data) {
+ *passdata = '\0';
return;
+ }
/* No variables or expressions in e->data, so why scan it? */
if ((!(tmp = strchr(e->data, '$'))) || (!strstr(tmp, "${") && !strstr(tmp, "$["))) {