[Asterisk-cvs] zaptel ztdynamic.c,1.7.2.3,1.7.2.4
russell
russell
Mon Aug 8 14:13:59 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv8397
Modified Files:
Tag: v1-0
ztdynamic.c
Log Message:
use vmalloc (bug #4920)
Index: ztdynamic.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdynamic.c,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -u -d -r1.7.2.3 -r1.7.2.4
--- ztdynamic.c 17 Jan 2005 01:58:09 -0000 1.7.2.3
+++ ztdynamic.c 8 Aug 2005 18:17:37 -0000 1.7.2.4
@@ -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