summaryrefslogtreecommitdiff
path: root/subsys
diff options
context:
space:
mode:
authorMitul Shah <mitul.a.shah@intel.com>2017-04-17 10:49:25 +0530
committerJukka Rissanen <jukka.rissanen@linux.intel.com>2017-04-21 14:19:49 +0300
commitd27ca378b66fb577c487e1c0256b1f748f58de41 (patch)
treef1fb4b360e0533788bc75a9a566f7e1140291a08 /subsys
parent52e3e5c68d6b34bcc55d0ebd689fcbfa92f69922 (diff)
net: context: Fixing bug in net context put flow
Following flow does not work: net_context_get net_context_bind .. .. net_context_put net_context_get net_context_bind At instance of call to net_context_bind, conn_handler is not NULL and returns with EISCONN. This patch sets conn_handler to NULL in net_context_unref Change-Id: I56a50839101b22161644b3cd7c5f510fa1abae3e Signed-off-by: Mitul Shah <mitul.a.shah@intel.com>
Diffstat (limited to 'subsys')
-rw-r--r--subsys/net/ip/net_context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/subsys/net/ip/net_context.c b/subsys/net/ip/net_context.c
index 21b48c83d..c8c96f20e 100644
--- a/subsys/net/ip/net_context.c
+++ b/subsys/net/ip/net_context.c
@@ -388,6 +388,7 @@ int net_context_unref(struct net_context *context)
if (context->conn_handler) {
net_conn_unregister(context->conn_handler);
+ context->conn_handler = NULL;
}
context->flags &= ~NET_CONTEXT_IN_USE;