[Asterisk-cvs] zaptel ztdynamic.c,1.11,1.12

markster markster
Mon Aug 8 10:22:55 CDT 2005


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv7320

Modified Files:
	ztdynamic.c 
Log Message:
Fix ztdynamic to use vmalloc instead of kmalloc (bug #4920)


Index: ztdynamic.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdynamic.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ztdynamic.c	15 Jan 2005 22:59:18 -0000	1.11
+++ ztdynamic.c	8 Aug 2005 14:26:34 -0000	1.12
@@ -32,6 +32,7 @@
 #include <linux/kmod.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/vmalloc.h>
 #ifdef CONFIG_DEVFS_FS
 #include <linux/devfs_fs_kernel.h>
 #endif
@@ -407,7 +408,7 @@
 
 	/* Free channels */
 	if (z->chans);
-		kfree(z->chans);
+		vfree(z->chans);
 	/* Free z */
 	kfree(z);
 
@@ -556,7 +557,7 @@
 	memset(z, 0, sizeof(struct zt_dynamic));
 
 	/* Allocate other memories */
-	z->chans = kmalloc(sizeof(struct zt_chan) * zds->numchans, GFP_KERNEL);
+	z->chans = vmalloc(sizeof(struct zt_chan) * zds->numchans);
 	if (!z->chans) {
 		dynamic_destroy(z);
 		return -ENOMEM;




More information about the svn-commits mailing list