Minor chan_nbs fix

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-04-09 04:22:25 +00:00
parent 863104131d
commit 6301ef6baf

View File

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