Merge pull request #169 from spinetix/spx-freetls

net.c: use after free in coap_free_context()
This commit is contained in:
obgm authored and GitHub committed 2018-04-17 08:57:46 +02:00
commit 0af655db70
1 file changed
+3 -3
+3 -3
View File
@@ -500,13 +500,13 @@ coap_free_context(coap_context_t *context) {
coap_delete_all_resources(context);
if (context->dtls_context)
coap_dtls_free_context(context->dtls_context);
LL_FOREACH_SAFE(context->endpoint, ep, tmp) {
coap_free_endpoint(ep);
}
if (context->dtls_context)
coap_dtls_free_context(context->dtls_context);
if (context->psk_hint)
coap_free(context->psk_hint);