diff options
Diffstat (limited to 'net/qrtr/ns.c')
-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 e760d4a38faf..fe81e0385168 100644 --- a/net/qrtr/ns.c +++ b/net/qrtr/ns.c @@ -83,7 +83,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; } |