From 99a09bc4fe16d275b2bf839cb8f37192b2235e24 Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Thu, 13 Sep 2018 15:16:09 +1000 Subject: Fix kernel crash, where kzalloc is not alloc'ing enough memory! The memory originally being allocated was not for a *, but for a **, hence the kernel crashes due to memory not being adequately allocated. Signed-off-by: Mark Farrugia --- alsa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alsa.c b/alsa.c index a8609b4..a899bb1 100755 --- a/alsa.c +++ b/alsa.c @@ -65,8 +65,7 @@ static int alloc_dev_config(struct avirt_alsa_devconfig **devconfig, if (numdevices == 0) return 0; - *devconfig = kzalloc(sizeof(*devconfig) * numdevices, - GFP_KERNEL); + *devconfig = kzalloc(sizeof(**devconfig) * numdevices, GFP_KERNEL); if (!(*devconfig)) return -ENOMEM; -- cgit 1.2.3-korg