Blame SOURCES/Fix-potential-free-of-non-heap-address.patch

472fdf
From e087470af1a51b58fbac434ff2e30bc3f2a1f9ac Mon Sep 17 00:00:00 2001
472fdf
From: Robbie Harwood <rharwood@redhat.com>
472fdf
Date: Mon, 11 Sep 2017 10:52:03 -0400
472fdf
Subject: [PATCH] Fix potential free of non-heap address
472fdf
472fdf
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
472fdf
Reviewed-by: Simo Sorce <simo@redhat.com>
472fdf
Merges: #211
472fdf
(cherry picked from commit 068f4174001c3ea4ae7913fb37210fec84abf1df)
472fdf
---
472fdf
 proxy/src/client/gpm_common.c | 4 ++--
472fdf
 1 file changed, 2 insertions(+), 2 deletions(-)
472fdf
472fdf
diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c
472fdf
index dba23a6..c65c69d 100644
472fdf
--- a/proxy/src/client/gpm_common.c
472fdf
+++ b/proxy/src/client/gpm_common.c
472fdf
@@ -553,8 +553,8 @@ static int gpm_send_recv_loop(struct gpm_ctx *gpmctx, char *send_buffer,
472fdf
             ret = gpm_retry_socket(gpmctx);
472fdf
 
472fdf
             /* Free buffer and set it to NULL to prevent free(xdr_reply_ctx) */
472fdf
-            free(recv_buffer);
472fdf
-            recv_buffer = NULL;
472fdf
+            free(*recv_buffer);
472fdf
+            *recv_buffer = NULL;
472fdf
 
472fdf
             if (ret != 0)
472fdf
                 return ret;