Skip to content

Commit

Permalink
crypto : asymmetric_keys : verify_pefile:zero memory content before f…
Browse files Browse the repository at this point in the history
…reeing

Signed-off-by: Loganaden Velvindron <[email protected]>
Signed-off-by: Yasir Auleear <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
loganaden authored and James Morris committed Jun 9, 2017
1 parent a773954 commit da7798a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/asymmetric_keys/verify_pefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen,
}

error:
kfree(desc);
kzfree(desc);
error_no_desc:
crypto_free_shash(tfm);
kleave(" = %d", ret);
Expand Down Expand Up @@ -450,6 +450,6 @@ int verify_pefile_signature(const void *pebuf, unsigned pelen,
ret = pefile_digest_pe(pebuf, pelen, &ctx);

error:
kfree(ctx.digest);
kzfree(ctx.digest);
return ret;
}

0 comments on commit da7798a

Please sign in to comment.