X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=crypto%2Fmpi%2Fmpiutil.c;h=26157e92efa6f90007d672709021facd4755375b;hb=refs%2Fheads%2Fvserver;hp=5bec431b5558cd0e1a4f7244e7d82d40e7d752eb;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/crypto/mpi/mpiutil.c b/crypto/mpi/mpiutil.c index 5bec431b5..26157e92e 100644 --- a/crypto/mpi/mpiutil.c +++ b/crypto/mpi/mpiutil.c @@ -97,10 +97,9 @@ int mpi_resize(MPI a, unsigned nlimbs) kfree(a->d); a->d = p; } else { - a->d = kmalloc( nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); + a->d = kzalloc( nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); if (!a->d) return -ENOMEM; - memset(a->d, 0, nlimbs * sizeof(mpi_limb_t) ); } a->alloced = nlimbs; return 0;