X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-distro%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-error-handling-in-gpm_send_buffer-gpm_recv_buffe.patch;fp=meta-starlingx%2Fmeta-stx-distro%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-error-handling-in-gpm_send_buffer-gpm_recv_buffe.patch;h=0000000000000000000000000000000000000000;hb=6fc6934434f70595536a387ece31bc30141cafb5;hp=3dad153912c38c00204fa00d1573bc870ff9e87a;hpb=eb1e26510491ba49de693ab3b0498edcb06be6c5;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-error-handling-in-gpm_send_buffer-gpm_recv_buffe.patch b/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-error-handling-in-gpm_send_buffer-gpm_recv_buffe.patch deleted file mode 100644 index 3dad153..0000000 --- a/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-error-handling-in-gpm_send_buffer-gpm_recv_buffe.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 027596a3df85d11948f4fb3a28d27d6523645589 Mon Sep 17 00:00:00 2001 -From: Alexander Scheel -Date: Thu, 14 Sep 2017 11:24:39 -0500 -Subject: [PATCH] Fix error handling in gpm_send_buffer/gpm_recv_buffer - -Signed-off-by: Alexander Scheel -Reviewed-by: Robbie Harwood -Merges: #213 -[rharwood@redhat.com: commit message formatting, copyright update] -(cherry picked from commit f2530fc280dd84e6abc0f5475e261aa0d2ee2a21) ---- - proxy/src/client/gpm_common.c | 18 ++++++------------ - 1 file changed, 6 insertions(+), 12 deletions(-) - -diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c -index b14e846..0d314fa 100644 ---- a/proxy/src/client/gpm_common.c -+++ b/proxy/src/client/gpm_common.c -@@ -1,4 +1,4 @@ --/* Copyright (C) 2011 the GSS-PROXY contributors, see COPYING for license */ -+/* Copyright (C) 2011,2017 the GSS-PROXY contributors, see COPYING for license */ - - #include "gssapi_gpm.h" - #include -@@ -415,10 +415,7 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx, - ret = 0; - - done: -- if (ret) { -- /* on errors we can only close the fd and return */ -- gpm_close_socket(gpmctx); -- } -+ /* we only need to return as gpm_retry_socket closes the socket */ - return ret; - } - -@@ -488,9 +485,10 @@ static int gpm_recv_buffer(struct gpm_ctx *gpmctx, - - done: - if (ret) { -- /* on errors we can only close the fd and return */ -- gpm_close_socket(gpmctx); -- gpm_epoll_close(gpmctx); -+ /* on errors, free the buffer to prevent calling -+ * xdr_destroy(&xdr_reply_ctx); */ -+ free(*buffer); -+ *buffer = NULL; - } - return ret; - } -@@ -560,10 +558,6 @@ static int gpm_send_recv_loop(struct gpm_ctx *gpmctx, char *send_buffer, - /* Close and reopen socket before trying again */ - ret = gpm_retry_socket(gpmctx); - -- /* Free buffer and set it to NULL to prevent free(xdr_reply_ctx) */ -- free(*recv_buffer); -- *recv_buffer = NULL; -- - if (ret != 0) - return ret; - ret = ETIMEDOUT;