diff --git a/examples/coap-server.c b/examples/coap-server.c index 55fb9cd7..5a6ab017 100644 --- a/examples/coap-server.c +++ b/examples/coap-server.c @@ -1119,6 +1119,8 @@ get_context(const char *node, const char *port) { } fprintf(stderr, "no context available for interface '%s'\n", node); + coap_free_context(ctx); + ctx = NULL; finish: freeaddrinfo(result);