Merge pull request #451 from nmeum/coap-server-segfault

coap_free_endpoint: fix segfault with incorrect -A argument
This commit is contained in:
obgm authored and GitHub committed 2020-02-12 13:24:26 +01:00
commit af841d3a91
1 file changed
+1 -1
+1 -1
View File
@@ -1129,7 +1129,7 @@ coap_free_endpoint(coap_endpoint_t *ep) {
coap_socket_close(&ep->sock);
}
if (ep->context) {
if (ep->context && ep->context->endpoint) {
LL_DELETE(ep->context->endpoint, ep);
}
coap_mfree_endpoint(ep);