net: tcp: Don't leak net_conn_handles

net_context_put() forgot to release the conn_handler field causing
subsequent failures in net_conn_register() when they ran out.

Change-Id: I0d306b5035199422fa8788338ac9da8d1900d5f9
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2017-01-10 11:21:21 -08:00 committed by Tomasz Bursztyka
commit fc35e649ff

View file

@ -294,6 +294,10 @@ int net_context_put(struct net_context *context)
}
#endif /* CONFIG_NET_TCP */
if (context->conn_handler) {
net_conn_unregister(context->conn_handler);
}
context->flags &= ~NET_CONTEXT_IN_USE;
#if defined(CONFIG_NET_TCP)