diff options
Diffstat (limited to 'net/qrtr')
-rw-r--r-- | net/qrtr/ns.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c index 97bfdf9fd028..722936f7dd98 100644 --- a/net/qrtr/ns.c +++ b/net/qrtr/ns.c @@ -84,7 +84,10 @@ static struct qrtr_node *node_get(unsigned int node_id) node->id = node_id; - radix_tree_insert(&nodes, node_id, node); + if (radix_tree_insert(&nodes, node_id, node)) { + kfree(node); + return NULL; + } return node; } |