diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-09-13 15:16:09 +1000 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-26 17:27:33 +1100 |
commit | 99a09bc4fe16d275b2bf839cb8f37192b2235e24 (patch) | |
tree | 861ba173e6499f7a7c89c99f1ce9a669dfe98c95 /alsa.c | |
parent | ae40030429b19a8d22517e99bd604cac8b37fd6e (diff) |
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 <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'alsa.c')
-rwxr-xr-x | alsa.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |