From c1cfd8ef05f47f2ccb5db80639e9501c9f16864c Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Tue, 18 Jan 2000 01:45:09 +0000 Subject: [PATCH] close the socket on context destroy --- lib/lwres/context.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/lwres/context.c b/lib/lwres/context.c index 2bbee1336e..65ecbaebf8 100644 --- a/lib/lwres/context.c +++ b/lib/lwres/context.c @@ -92,6 +92,11 @@ lwres_context_destroy(lwres_context_t **contextp) ctx = *contextp; *contextp = NULL; + if (ctx->sock != -1) { + close(ctx->sock); + ctx->sock = -1; + } + CTXFREE(ctx, sizeof(lwres_context_t)); }