Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1709911 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-08-11 20:40 +0200 |
| Last post | 2017-08-11 21:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH][next] Bluetooth: kfree tmp rather than an alias to it Colin King <colin.king@canonical.com> - 2017-08-11 20:40 +0200
Re: [PATCH][next] Bluetooth: kfree tmp rather than an alias to it Marcel Holtmann <marcel@holtmann.org> - 2017-08-11 21:30 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-08-11 20:40 +0200 |
| Subject | [PATCH][next] Bluetooth: kfree tmp rather than an alias to it |
| Message-ID | <udn0L-6Yw-65@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Date | 2017-08-11 21:30 +0200 |
| Message-ID | <udnN7-7vf-7@gated-at.bofh.it> |
| In reply to | #1709911 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web