Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcd36c43 authored by Rob Rice's avatar Rob Rice Committed by Herbert Xu
Browse files

crypto: brcm - Avoid double free in ahash_finup()



In Broadcom SPU driver, in case where incremental hash
is done in software in ahash_finup(), tmpbuf was freed
twice.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRob Rice <rob.rice@broadcom.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent eafa2669
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2331,7 +2331,6 @@ static int ahash_finup(struct ahash_request *req)
		/* Call synchronous update */
		ret = crypto_shash_finup(ctx->shash, tmpbuf, req->nbytes,
					 req->result);
		kfree(tmpbuf);
	} else {
		/* Otherwise call the internal function which uses SPU hw */
		return __ahash_finup(req);