]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
Bluetooth: kfree tmp rather than an alias to it
authorColin Ian King <colin.king@canonical.com>
Fri, 11 Aug 2017 18:33:04 +0000 (19:33 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 11 Aug 2017 19:19:46 +0000 (21:19 +0200)
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>
net/bluetooth/selftest.c

index ee92c925ecc5d3ac42bc041f60924da80672e1b8..34a1227f43910e9d728e6a312e5933a9231aed9f 100644 (file)
@@ -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;
 }