Skip to content
Snippets Groups Projects
Commit 6ce084b7 authored by Russell Bryant's avatar Russell Bryant
Browse files

remove unreachable block of code (bug #4207)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent fbbac7cd
Branches
Tags
No related merge requests found
...@@ -449,9 +449,10 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in ...@@ -449,9 +449,10 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in
return NULL; return NULL;
} }
tmp = ast_channel_alloc(0); tmp = ast_channel_alloc(0);
if (!tmp) if (!tmp) {
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
return NULL; return NULL;
if (tmp) { }
tmp->tech = &features_tech; tmp->tech = &features_tech;
for (x=1;x<4;x++) { for (x=1;x<4;x++) {
snprintf(tmp->name, sizeof(tmp->name), "Feature/%s/%s-%d", p->tech, p->dest, x); snprintf(tmp->name, sizeof(tmp->name), "Feature/%s/%s-%d", p->tech, p->dest, x);
...@@ -479,8 +480,6 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in ...@@ -479,8 +480,6 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in
usecnt++; usecnt++;
ast_mutex_unlock(&usecnt_lock); ast_mutex_unlock(&usecnt_lock);
ast_update_use_count(); ast_update_use_count();
} else
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
return tmp; return tmp;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment