Blame SOURCES/Make-sure-to-free-also-the-remote-ctx-struct.patch

9af0d9
From a02741d82ff44b3c93747615f560dae1bbe7c57b Mon Sep 17 00:00:00 2001
9af0d9
From: Simo Sorce <simo@redhat.com>
9af0d9
Date: Thu, 27 Aug 2020 12:44:45 -0400
9af0d9
Subject: [PATCH] Make sure to free also the remote ctx struct
9af0d9
9af0d9
The xdr_free() call only frees the contents and not the containing
9af0d9
structure itself.
9af0d9
9af0d9
Signed-off-by: Simo Sorce <simo@redhat.com>
9af0d9
Reviewed-by: Robbie Harwood <rharwood@redhat.com>
9af0d9
(cherry picked from commit e6811347c23b6c62d9f1869da089ab9900f97a84)
9af0d9
(cherry picked from commit 8d5457c290d513781b54be54ede9c81cc5d1fff8)
9af0d9
---
9af0d9
 src/client/gpm_release_handle.c | 2 ++
9af0d9
 1 file changed, 2 insertions(+)
9af0d9
9af0d9
diff --git a/src/client/gpm_release_handle.c b/src/client/gpm_release_handle.c
9af0d9
index 8f49ee9..2f70781 100644
9af0d9
--- a/src/client/gpm_release_handle.c
9af0d9
+++ b/src/client/gpm_release_handle.c
9af0d9
@@ -106,5 +106,7 @@ rel_done:
9af0d9
     gpm_free_xdrs(GSSX_RELEASE_HANDLE, &uarg, &ures);
9af0d9
 done:
9af0d9
     xdr_free((xdrproc_t)xdr_gssx_ctx, (char *)r);
9af0d9
+    free(r);
9af0d9
+    *context_handle = NULL;
9af0d9
     return ret;
9af0d9
 }