diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-21 16:02:47 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-21 16:02:47 +0000 |
commit | fc0b5cce51638005fa99570e1b57f5e347683c24 (patch) | |
tree | 4c576be5e4ecde2b663d1ff86ca7f9653297ec7d | |
parent | f378c8f6ea890b821678705f7469f4264fc9813f (diff) |
Merged revisions 2201 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4
................
r2201 | mattf | 2007-02-21 09:58:53 -0600 (Wed, 21 Feb 2007) | 10 lines
Merged revisions 2199 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r2199 | mattf | 2007-02-21 09:57:20 -0600 (Wed, 21 Feb 2007) | 2 lines
Make sure we do the check for memory allocation failure.
........
................
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2204 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | wct4xxp/vpm450m.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wct4xxp/vpm450m.c b/wct4xxp/vpm450m.c index 8f82376..4e5fa91 100644 --- a/wct4xxp/vpm450m.c +++ b/wct4xxp/vpm450m.c @@ -210,6 +210,10 @@ static void vpm450m_setecmode(struct vpm450m *vpm450m, int channel, int mode) if (vpm450m->ecmode[channel] == mode) return; modify = kmalloc(sizeof(tOCT6100_CHANNEL_MODIFY), GFP_KERNEL); + if (!modify) { + printk("wct4xxp: Unable to allocate memory for setec!\n"); + return; + } Oct6100ChannelModifyDef(modify); modify->ulEchoOperationMode = mode; modify->ulChannelHndl = vpm450m->aulEchoChanHndl[channel]; @@ -231,6 +235,10 @@ void vpm450m_setdtmf(struct vpm450m *vpm450m, int channel, int detect, int mute) UINT32 ulResult; modify = kmalloc(sizeof(tOCT6100_CHANNEL_MODIFY), GFP_KERNEL); + if (!modify) { + printk("wct4xxp: Unable to allocate memory for setdtmf!\n"); + return; + } Oct6100ChannelModifyDef(modify); modify->ulChannelHndl = vpm450m->aulEchoChanHndl[channel]; if (mute) { |