From 322a7e578cc1f3b54bfb317dd57442231a8f7cf7 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Thu, 2 Aug 2018 16:02:50 -0400 Subject: [PATCH] Don't leak sock_ctx if verto_add_io() fails Signed-off-by: Robbie Harwood (cherry picked from commit 459152be1e701af6aafdecffc1af21156b43bf78) --- src/gssproxy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gssproxy.c b/src/gssproxy.c index db6e89b..93c1c1e 100644 --- a/src/gssproxy.c +++ b/src/gssproxy.c @@ -46,6 +46,7 @@ static verto_ev *setup_socket(char *sock_name, verto_ctx *vctx) ev = verto_add_io(vctx, vflags, accept_sock_conn, sock_ctx->fd); if (!ev) { + free(sock_ctx); return NULL; }