* [PATCH][next] Bluetooth: kfree tmp rather than an alias to it
@ 2017-08-11 18:33 Colin King
2017-08-11 19:20 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-08-11 18:33 UTC (permalink / raw)
To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, David S . Miller,
linux-bluetooth, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
net/bluetooth/selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/selftest.c b/net/bluetooth/selftest.c
index ee92c925ecc5..34a1227f4391 100644
--- a/net/bluetooth/selftest.c
+++ b/net/bluetooth/selftest.c
@@ -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;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] Bluetooth: kfree tmp rather than an alias to it
2017-08-11 18:33 [PATCH][next] Bluetooth: kfree tmp rather than an alias to it Colin King
@ 2017-08-11 19:20 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2017-08-11 19:20 UTC (permalink / raw)
To: Colin King
Cc: Gustavo F. Padovan, Johan Hedberg, David S. Miller,
open list:BLUETOOTH DRIVERS, Netdev list, kernel-janitors,
linux-kernel
Hi Colin,
> 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>
> ---
> net/bluetooth/selftest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-11 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 18:33 [PATCH][next] Bluetooth: kfree tmp rather than an alias to it Colin King
2017-08-11 19:20 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox