aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_features.c')
-rw-r--r--channels/chan_features.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_features.c b/channels/chan_features.c
index 65146f463..d6c2f0aa5 100644
--- a/channels/chan_features.c
+++ b/channels/chan_features.c
@@ -451,7 +451,11 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in
for (x=1;x<4;x++) {
if (b2)
ast_free(b2);
- asprintf(&b2, "%s/%s-%d", p->tech, p->dest, x);
+ if (asprintf(&b2, "%s/%s-%d", p->tech, p->dest, x) < 0) {
+ ast_log(LOG_WARNING, "Unable to create channel name: %s\n", strerror(errno));
+ b2 = NULL;
+ continue;
+ }
for (y=0;y<3;y++) {
if (y == index)
continue;