aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-22 00:27:48 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-22 00:27:48 +0000
commitf593e8c4ce7e06df6b162fc8208992e7e3fb6dea (patch)
tree25333ff5e394f045aa36ec93bfb7316eeae2daee /pbx.c
parent8f30aa29846673327fd04114d653311963782068 (diff)
Use ast_strdupa instead of strdup in goto (bug #1465)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2735 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index cdf57e0f6..abc1de1f0 100755
--- a/pbx.c
+++ b/pbx.c
@@ -4373,7 +4373,7 @@ static int pbx_builtin_goto(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Goto requires an argument (optional context|optional extension|priority)\n");
return -1;
}
- s = strdup((void *) data);
+ s = ast_strdupa((void *) data);
stringp=s;
context = strsep(&stringp, "|");
exten = strsep(&stringp, "|");
@@ -4393,7 +4393,6 @@ static int pbx_builtin_goto(struct ast_channel *chan, void *data)
}
if (atoi(pri) < 0) {
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0\n", pri);
- free(s);
return -1;
}
/* At this point we have a priority and maybe an extension and a context */