| .. | .. |
|---|
| 171 | 171 | struct aead_request *req = areq->data; |
|---|
| 172 | 172 | struct essiv_aead_request_ctx *rctx = aead_request_ctx(req); |
|---|
| 173 | 173 | |
|---|
| 174 | + if (err == -EINPROGRESS) |
|---|
| 175 | + goto out; |
|---|
| 176 | + |
|---|
| 174 | 177 | kfree(rctx->assoc); |
|---|
| 178 | + |
|---|
| 179 | +out: |
|---|
| 175 | 180 | aead_request_complete(req, err); |
|---|
| 176 | 181 | } |
|---|
| 177 | 182 | |
|---|
| .. | .. |
|---|
| 247 | 252 | err = enc ? crypto_aead_encrypt(subreq) : |
|---|
| 248 | 253 | crypto_aead_decrypt(subreq); |
|---|
| 249 | 254 | |
|---|
| 250 | | - if (rctx->assoc && err != -EINPROGRESS) |
|---|
| 255 | + if (rctx->assoc && err != -EINPROGRESS && err != -EBUSY) |
|---|
| 251 | 256 | kfree(rctx->assoc); |
|---|
| 252 | 257 | return err; |
|---|
| 253 | 258 | } |
|---|