summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrussell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-08 18:17:37 +0000
committerrussell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-08 18:17:37 +0000
commit91927c88c82082378e79008315197af7f90527cf (patch)
treed499f60b9d52becbec4575328895a47095b063ed
parentf39528218369110ccd65c07f22ea104f46876a97 (diff)
use vmalloc (bug #4920)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@722 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xztdynamic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ztdynamic.c b/ztdynamic.c
index 4d959dd..b652ae7 100755
--- a/ztdynamic.c
+++ b/ztdynamic.c
@@ -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 @@ static void dynamic_destroy(struct zt_dynamic *z)
/* Free channels */
if (z->chans);
- kfree(z->chans);
+ vfree(z->chans);
/* Free z */
kfree(z);
@@ -556,7 +557,7 @@ static int create_dynamic(ZT_DYNAMIC_SPAN *zds)
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;