[zaptel-commits] mattf: branch 1.2 r2199 -
/branches/1.2/wct4xxp/vpm450m.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Wed Feb 21 08:57:21 MST 2007
Author: mattf
Date: Wed Feb 21 09:57:20 2007
New Revision: 2199
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2199
Log:
Make sure we do the check for memory allocation failure.
Modified:
branches/1.2/wct4xxp/vpm450m.c
Modified: branches/1.2/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/vpm450m.c?view=diff&rev=2199&r1=2198&r2=2199
==============================================================================
--- branches/1.2/wct4xxp/vpm450m.c (original)
+++ branches/1.2/wct4xxp/vpm450m.c Wed Feb 21 09:57:20 2007
@@ -210,6 +210,10 @@
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 @@
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) {
More information about the zaptel-commits
mailing list