Skip to content

Commit

Permalink
Bluetooth: kfree tmp rather than an alias to it
Browse files Browse the repository at this point in the history
While the kfree of dhkey_a is of the same address of tmp, it
probably is clearer and more human readable if tmp is kfree'd
rather than dhkey_a.

Detected by CoverityScan, CID#1448650 ("Free of address-of expression")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Colin Ian King authored and Marcel Holtmann committed Aug 11, 2017
1 parent 198ec9a commit 3dfe55d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int __init test_ecdh_sample(const u8 priv_a[32], const u8 priv_b[32],
ret = -EINVAL;

out:
kfree(dhkey_a);
kfree(tmp);
return ret;
}

Expand Down

0 comments on commit 3dfe55d

Please sign in to comment.