Skip to content

Commit

Permalink
crypto: tcrypt - free xoutbuf instead of axbuf
Browse files Browse the repository at this point in the history
There seems to be a cut-n-paste bug with the name of the buffer being
free'd, xoutbuf should be used instead of axbuf.

Detected by CoverityScan, CID#1463420 ("Copy-paste error")

Fixes: 427988d ("crypto: tcrypt - add multibuf aead speed test")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Colin Ian King authored and herbertx committed Jan 12, 2018
1 parent 38dbe2d commit c6ba4f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static void test_mb_aead_speed(const char *algo, int enc, int secs,
for (i = 0; i < num_mb; ++i)
if (testmgr_alloc_buf(data[i].xoutbuf)) {
while (i--)
testmgr_free_buf(data[i].axbuf);
testmgr_free_buf(data[i].xoutbuf);
goto out_free_axbuf;
}

Expand Down

0 comments on commit c6ba4f3

Please sign in to comment.