Minor chan_nbs fix

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 22 years ago
parent 863104131d
commit 6301ef6baf

@ -244,9 +244,11 @@ static struct ast_channel *nbs_request(char *type, int format, void *data)
return NULL;
}
p = nbs_alloc(data);
tmp = nbs_new(p, AST_STATE_DOWN);
if (!tmp)
nbs_destroy(p);
if (p) {
tmp = nbs_new(p, AST_STATE_DOWN);
if (!tmp)
nbs_destroy(p);
}
return tmp;
}

Loading…
Cancel
Save