linux-stable/net/qrtr
Natalia Petrova 29de68c2b3 net: qrtr: free memory on error path in radix_tree_insert()
Function radix_tree_insert() returns errors if the node hasn't
been initialized and added to the tree.

"kfree(node)" and return value "NULL" of node_get() help
to avoid using unclear node in other calls.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Cc: <stable@vger.kernel.org> # 5.7
Fixes: 0c2204a4ad ("net: qrtr: Migrate nameservice to kernel from userspace")
Signed-off-by: Natalia Petrova <n.petrova@fintech.ru>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/20230125134831.8090-1-n.petrova@fintech.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-28 00:21:32 -08:00
..
af_qrtr.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile net: qrtr: combine nameservice into main module 2021-09-28 17:36:43 -07:00
mhi.c net: qrtr: start MHI channel after endpoit creation 2022-08-15 11:21:42 +01:00
ns.c net: qrtr: free memory on error path in radix_tree_insert() 2023-01-28 00:21:32 -08:00
qrtr.h net: qrtr: fix null-ptr-deref in qrtr_ns_remove 2021-01-05 16:50:09 -08:00
smd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
tun.c net: qrtr: Fix memory leak in qrtr_tun_open 2021-02-23 15:38:22 -08:00