Commit c0682a9d authored by Jukka Rissanen's avatar Jukka Rissanen
Browse files

net: context: Init context state after unref



When the context is freed, we must set the state to UNCONNECTED.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent 35d28fb5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -398,6 +398,8 @@ int net_context_unref(struct net_context *context)
		context->conn_handler = NULL;
	}

	net_context_set_state(context, NET_CONTEXT_UNCONNECTED);

	context->flags &= ~NET_CONTEXT_IN_USE;

	NET_DBG("Context %p released", context);