File 0001-fix-parms.r_addr-memory-leak.patch of Package libtirpc.24713

From e2fcd59b2e5795964eeea70591ecd0951e7df115 Mon Sep 17 00:00:00 2001
From: Ali Abdallah <ali.abdallah@suse.com>
Date: Fri, 22 Apr 2022 12:02:02 +0200
Subject: [PATCH] fix parms.r_addr memory leak

---
 src/rpcb_clnt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
index 0c34cb7..1a23cb1 100644
--- a/src/rpcb_clnt.c
+++ b/src/rpcb_clnt.c
@@ -798,6 +798,10 @@ __try_protocol_version_2(program, version, nconf, host, tp)
 	pmapaddress->len = pmapaddress->maxlen = remote.len;
 
 	CLNT_DESTROY(client);
+
+	if (parms.r_addr != NULL && parms.r_addr != nullstring)
+		free(parms.r_addr);
+
 	return pmapaddress;
 
 error:
@@ -806,6 +810,10 @@ error:
 		client = NULL;
 
 	}
+
+	if (parms.r_addr != NULL && parms.r_addr != nullstring)
+		free(parms.r_addr);
+
 	return (NULL);
 
 }
-- 
2.35.1

openSUSE Build Service is sponsored by