crypto: cavium/nitrox - Use after free in process_response_list()

We free "sr" and then dereference it on the next line.

Fixes: c9613335bf ("crypto: cavium/nitrox - Added AEAD cipher support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Dan Carpenter 2019-01-04 09:46:11 +03:00 committed by Herbert Xu
parent a777336362
commit 06bbf75347

View File

@ -567,10 +567,10 @@ static void process_response_list(struct nitrox_cmdq *cmdq)
/* ORH error code */
err = READ_ONCE(*sr->resp.orh) & 0xff;
softreq_destroy(sr);
if (sr->callback)
sr->callback(sr->cb_arg, err);
softreq_destroy(sr);
req_completed++;
}