coap_free_endpoint does not clean up tinydtls encryption sessions

Following on from #324 where coap_session_mfree() had to be moved in
coap_session_free() to correctly allow for tinydtls cleanup, session->endpoint
and session->context should not be cleared out prior to call of
coap_sesson_free() in coap_free_endpoint().

src/coap_session.c:

Remove lines setting session->endpoint and session->context to NULL
This commit is contained in:
Jon Shallow committed 2019-04-11 10:47:17 +01:00
1 parent 302bbffebd
commit bc789edff8
1 file changed
-2
-2
View File
@@ -915,8 +915,6 @@ coap_free_endpoint(coap_endpoint_t *ep) {
LL_FOREACH_SAFE(ep->sessions, session, tmp) {
assert(session->ref == 0);
if (session->ref == 0) {
session->endpoint = NULL;
session->context = NULL;
coap_session_free(session);
}
}