Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-distro / recipes-security / gssproxy / files / Don-t-leak-mech_type-when-CONTINUE_NEEDED-from-init_.patch
1 From dd1699810efe933858badce463bece239d19e886 Mon Sep 17 00:00:00 2001
2 From: Alexander Scheel <ascheel@redhat.com>
3 Date: Tue, 8 Aug 2017 11:36:56 -0400
4 Subject: [PATCH] Don't leak mech_type when CONTINUE_NEEDED from
5  init_sec_context
6
7 Signed-off-by: Alexander Scheel <ascheel@redhat.com>
8 Reviewed-by: Simo Sorce <simo@redhat.com>
9 Reviewed-by: Robbie Harwood <rharwood@redhat.com>
10 Merges: #207
11 (cherry picked from commit ca26c0f58ac961a16b06c3fb93b985d574116b2c)
12 ---
13  proxy/src/gp_export.c | 1 +
14  1 file changed, 1 insertion(+)
15
16 diff --git a/proxy/src/gp_export.c b/proxy/src/gp_export.c
17 index 0c39045..c9f5fd4 100644
18 --- a/proxy/src/gp_export.c
19 +++ b/proxy/src/gp_export.c
20 @@ -687,6 +687,7 @@ export:
21      case EXP_CTX_PARTIAL:
22          /* this happens only when a init_sec_context call returns a partially
23           * initialized context so we return only what we have, not much */
24 +        xdr_free((xdrproc_t)xdr_gssx_OID, (char *)&out->mech);
25          ret = gp_conv_oid_to_gssx(mech, &out->mech);
26          if (ret) {
27              ret_maj = GSS_S_FAILURE;