]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make sure that the pvt structure exists before trying to do fixup on Local channels...
authorJoshua Colp <jcolp@digium.com>
Wed, 15 Nov 2006 22:29:30 +0000 (22:29 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 15 Nov 2006 22:29:30 +0000 (22:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47711 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index 84fd9d220f7a3aba66b4f57996b65f365affa858..29c856573124bdcae97bfce596e0e15f5a7dcf64 100644 (file)
@@ -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)) {