From c167f3bc98306c4580517d81b9d5ce1fc1597bb5 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 3 Aug 2018 10:31:38 -0400 Subject: [PATCH] Don't leak sock_ctx if verto_add_io() fails --- ...-leak-sock_ctx-if-verto_add_io-fails.patch | 23 +++++++++++++++++++ gssproxy.spec | 6 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Don-t-leak-sock_ctx-if-verto_add_io-fails.patch diff --git a/Don-t-leak-sock_ctx-if-verto_add_io-fails.patch b/Don-t-leak-sock_ctx-if-verto_add_io-fails.patch new file mode 100644 index 0000000..aaa17b8 --- /dev/null +++ b/Don-t-leak-sock_ctx-if-verto_add_io-fails.patch @@ -0,0 +1,23 @@ +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; + } + diff --git a/gssproxy.spec b/gssproxy.spec index 85b6897..b18097b 100644 --- a/gssproxy.spec +++ b/gssproxy.spec @@ -1,7 +1,7 @@ Name: gssproxy Version: 0.8.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: GSSAPI Proxy Group: System Environment/Libraries @@ -17,6 +17,7 @@ Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz Patch0: Always-use-the-encype-we-selected.patch Patch1: Clarify-debug-and-debug_level-in-man-pages.patch Patch2: Always-choose-highest-requested-debug-level.patch +Patch3: Don-t-leak-sock_ctx-if-verto_add_io-fails.patch ### Dependencies ### Requires: krb5-libs >= 1.12.0 @@ -110,6 +111,9 @@ mkdir -p %{buildroot}%{gpstatedir}/rcache %systemd_postun_with_restart gssproxy.service %changelog +* Fri Aug 03 2018 Robbie Harwood - 0.8.0-6 +- Don't leak sock_ctx if verto_add_io() fails + * Fri Jul 13 2018 Fedora Release Engineering - 0.8.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild