summaryrefslogtreecommitdiff
path: root/wct4xxp/vpm450m.c
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-21 15:58:53 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-21 15:58:53 +0000
commit1dd32b27eb6c581f3ddb4da1add02d41f55f3fb8 (patch)
tree9a2aece33b7ab6d3b12210790ea41cbcde42e4e1 /wct4xxp/vpm450m.c
parenta78a2111d55d3f1b8e2378d40c820ae84c887b50 (diff)
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/branches/1.4@2201 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp/vpm450m.c')
-rw-r--r--wct4xxp/vpm450m.c8
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) {