aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index bcbf8f11a..b3fb697f4 100755
--- a/channel.c
+++ b/channel.c
@@ -279,8 +279,8 @@ struct ast_channel *ast_channel_alloc(int needqueue)
return NULL;
PTHREAD_MUTEX_LOCK(&chlock);
tmp = malloc(sizeof(struct ast_channel));
- memset(tmp, 0, sizeof(struct ast_channel));
if (tmp) {
+ memset(tmp, 0, sizeof(struct ast_channel));
pvt = malloc(sizeof(struct ast_channel_pvt));
if (pvt) {
memset(pvt, 0, sizeof(struct ast_channel_pvt));