diff options
author | Mark Brown <broonie@kernel.org> | 2017-10-19 19:45:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-10-19 19:45:49 +0100 |
commit | db9a977371d6245095791862797e8e7983a25ac0 (patch) | |
tree | 9ba289bdd8831b061743a8d48b13e6128306b8f1 | |
parent | fc628d5460223588ea5aff6e038655f2f910e2dd (diff) | |
parent | 508f8d23a372beae647185ce896a0c1109406b83 (diff) | |
download | linux-crypto-db9a977371d6245095791862797e8e7983a25ac0.tar.gz linux-crypto-db9a977371d6245095791862797e8e7983a25ac0.zip |
Merge branch 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux into asoc-amd
Diffstat (limited to '')
-rw-r--r-- | crypto/af_alg.c | 4 | ||||
-rw-r--r-- | crypto/drbg.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index ffa9f4cc..337cf382 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -619,14 +619,14 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst, struct af_alg_ctx *ctx = ask->private; struct af_alg_tsgl *sgl; struct scatterlist *sg; - unsigned int i, j; + unsigned int i, j = 0; while (!list_empty(&ctx->tsgl_list)) { sgl = list_first_entry(&ctx->tsgl_list, struct af_alg_tsgl, list); sg = sgl->sg; - for (i = 0, j = 0; i < sgl->cur; i++) { + for (i = 0; i < sgl->cur; i++) { size_t plen = min_t(size_t, used, sg[i].length); struct page *page = sg_page(sg + i); diff --git a/crypto/drbg.c b/crypto/drbg.c index 633a88e9..70018397 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1133,10 +1133,10 @@ static inline void drbg_dealloc_state(struct drbg_state *drbg) { if (!drbg) return; - kzfree(drbg->V); - drbg->Vbuf = NULL; - kzfree(drbg->C); - drbg->Cbuf = NULL; + kzfree(drbg->Vbuf); + drbg->V = NULL; + kzfree(drbg->Cbuf); + drbg->C = NULL; kzfree(drbg->scratchpadbuf); drbg->scratchpadbuf = NULL; drbg->reseed_ctr = 0; |