From: Mark Spencer Date: Wed, 9 Apr 2003 04:22:25 +0000 (+0000) Subject: Minor chan_nbs fix X-Git-Tag: 0.4.0~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6301ef6bafaf75f840a3b97f43b9d9c22fd28996;p=thirdparty%2Fasterisk.git Minor chan_nbs fix git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@793 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c index f1fd22fcb5..f366f976e2 100755 --- a/channels/chan_nbs.c +++ b/channels/chan_nbs.c @@ -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; }