[zaptel-commits] mattf: branch 1.4 r2201 - in /branches/1.4: ./ wct4xxp/vpm450m.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Wed Feb 21 08:58:53 MST 2007


Author: mattf
Date: Wed Feb 21 09:58:53 2007
New Revision: 2201

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2201
Log:
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.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/wct4xxp/vpm450m.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/vpm450m.c?view=diff&rev=2201&r1=2200&r2=2201
==============================================================================
--- branches/1.4/wct4xxp/vpm450m.c (original)
+++ branches/1.4/wct4xxp/vpm450m.c Wed Feb 21 09:58:53 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