Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (a->d) {
- p = kmalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL);
- if (!p)
- return -ENOMEM;
- memcpy(p, a->d, a->alloced * sizeof(mpi_limb_t));
- kzfree(a->d);
- a->d = p;
- } else {
- a->d = kzalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL);
- if (!a->d)
- return -ENOMEM;
- }
- a->alloced = nlimbs;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement