[lvc-project] [PATCH] net: qrtr: free memory on error path in radix_tree_insert()

Simon Horman simon.horman at corigine.com
Wed Jan 25 18:04:20 MSK 2023


On Wed, Jan 25, 2023 at 04:48:31PM +0300, Natalia Petrova wrote:
> 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.
> 
> Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
> Signed-off-by: Natalia Petrova <n.petrova at fintech.ru>

Reviewed-by: Simon Horman <simon.horman at corigine.com>




More information about the lvc-project mailing list