diff options
Diffstat (limited to 'lib/mpi/mpiutil.c')
-rw-r--r-- | lib/mpi/mpiutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mpi/mpiutil.c b/lib/mpi/mpiutil.c index 314f4dfa603e..2dbfc4c8a237 100644 --- a/lib/mpi/mpiutil.c +++ b/lib/mpi/mpiutil.c | |||
@@ -91,7 +91,7 @@ int mpi_resize(MPI a, unsigned nlimbs) | |||
91 | return 0; /* no need to do it */ | 91 | return 0; /* no need to do it */ |
92 | 92 | ||
93 | if (a->d) { | 93 | if (a->d) { |
94 | p = kmalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); | 94 | p = kmalloc_array(nlimbs, sizeof(mpi_limb_t), GFP_KERNEL); |
95 | if (!p) | 95 | if (!p) |
96 | return -ENOMEM; | 96 | return -ENOMEM; |
97 | memcpy(p, a->d, a->alloced * sizeof(mpi_limb_t)); | 97 | memcpy(p, a->d, a->alloced * sizeof(mpi_limb_t)); |