From: Joshua Colp Date: Wed, 15 Nov 2006 22:29:30 +0000 (+0000) Subject: Make sure that the pvt structure exists before trying to do fixup on Local channels... X-Git-Tag: 1.2.14~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3de4d365324a239274a8226e26950bc4d2e1fa6;p=thirdparty%2Fasterisk.git Make sure that the pvt structure exists before trying to do fixup on Local channels. (issue #7937 reported by mada123, fix by alamantia with mods by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47711 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_local.c b/channels/chan_local.c index 84fd9d220f..29c8565731 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -263,6 +263,10 @@ static int local_write(struct ast_channel *ast, struct ast_frame *f) static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) { struct local_pvt *p = newchan->tech_pvt; + + if (!p) + return -1; + ast_mutex_lock(&p->lock); if ((p->owner != oldchan) && (p->chan != oldchan)) {