diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-15 22:29:30 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-15 22:29:30 +0000 |
commit | 539ba4801e1d0eaa2a65ec2b0de13948e4b77419 (patch) | |
tree | a71379433aa22ac6aa4c99c426ff3f47031c0b0c /channels/chan_local.c | |
parent | 4f2a5fd9bf0fd48f870d9f2f5a75deda9bbee8da (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.2@47711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 84fd9d220..29c856573 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)) { |