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-potential-free-of-non-heap-address.patch;fp=meta-starlingx%2Fmeta-stx-distro%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-potential-free-of-non-heap-address.patch;h=699307b5bedb0666052177589ecd524b4c58b80d;hb=e0634c6eaf2fe2641a0fb90e84a5defb880b1335;hp=0000000000000000000000000000000000000000;hpb=210d0f78485e760dffcdd3f630f59cec797f3f11;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-potential-free-of-non-heap-address.patch b/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-potential-free-of-non-heap-address.patch new file mode 100644 index 0000000..699307b --- /dev/null +++ b/meta-starlingx/meta-stx-distro/recipes-security/gssproxy/files/Fix-potential-free-of-non-heap-address.patch @@ -0,0 +1,28 @@ +From e087470af1a51b58fbac434ff2e30bc3f2a1f9ac Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Mon, 11 Sep 2017 10:52:03 -0400 +Subject: [PATCH] Fix potential free of non-heap address + +Signed-off-by: Robbie Harwood +Reviewed-by: Simo Sorce +Merges: #211 +(cherry picked from commit 068f4174001c3ea4ae7913fb37210fec84abf1df) +--- + proxy/src/client/gpm_common.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c +index dba23a6..c65c69d 100644 +--- a/proxy/src/client/gpm_common.c ++++ b/proxy/src/client/gpm_common.c +@@ -553,8 +553,8 @@ static int gpm_send_recv_loop(struct gpm_ctx *gpmctx, char *send_buffer, + ret = gpm_retry_socket(gpmctx); + + /* Free buffer and set it to NULL to prevent free(xdr_reply_ctx) */ +- free(recv_buffer); +- recv_buffer = NULL; ++ free(*recv_buffer); ++ *recv_buffer = NULL; + + if (ret != 0) + return ret;