aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_queue.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 28958969c..92bc97852 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4365,7 +4365,7 @@ static int reload_queues(void)
struct ao2_iterator mem_iter;
int new;
const char *general_val = NULL;
- char parse[80];
+ char *parse;
char *interface, *state_interface;
char *membername = NULL;
int penalty;
@@ -4450,7 +4450,9 @@ static int reload_queues(void)
}
/* Add a new member */
- ast_copy_string(parse, var->value, sizeof(parse));
+ if (!(parse = ast_strdup(var->value))) {
+ continue;
+ }
AST_NONSTANDARD_APP_ARGS(args, parse, ',');
@@ -4496,6 +4498,7 @@ static int reload_queues(void)
else {
q->membercount++;
}
+ ast_free(parse);
} else {
queue_set_param(q, var->name, var->value, var->lineno, 1);
}