Skip to content

Commit

Permalink
lib/pka_dev.c: NULL pointer kfree()'d in pka_dev_create_shim()
Browse files Browse the repository at this point in the history
If 'shim->rings' is NULL then the "unable to kmalloc" branch is
taken which does kfree(NULL).
  • Loading branch information
kblaiech authored and mahantesh-nvidia committed Jun 9, 2021
1 parent 1725f21 commit 65016c6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/pka_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ static int pka_dev_create_shim(pka_dev_shim_t *shim, uint32_t shim_id,
if (!shim->rings)
{
PKA_ERROR(PKA_DEV, "unable to kmalloc\n");
kfree(shim->rings);
return -ENOMEM;
}

Expand Down

0 comments on commit 65016c6

Please sign in to comment.