summaryrefslogtreecommitdiff
path: root/net/mctp/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mctp/route.c')
-rw-r--r--net/mctp/route.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mctp/route.c b/net/mctp/route.c
index 04781459b2be..82fb5ae524f6 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -372,6 +372,7 @@ static int mctp_route_input(struct mctp_route *route, struct sk_buff *skb)
trace_mctp_key_acquire(key);
/* we don't need to release key->lock on exit */
+ mctp_key_unref(key);
key = NULL;
} else {
@@ -584,6 +585,9 @@ static int mctp_alloc_local_tag(struct mctp_sock *msk,
trace_mctp_key_acquire(key);
*tagp = key->tag;
+ /* done with the key in this scope */
+ mctp_key_unref(key);
+ key = NULL;
rc = 0;
}