diff mbox series

[03/13] clnt_bcast.c: resource_leak

Message ID 20180907180151.178872-4-steved@redhat.com (mailing list archive)
State New, archived
Headers show
Series libtirpc: Closed a number of memory leaks | expand

Commit Message

Steve Dickson Sept. 7, 2018, 6:01 p.m. UTC
Variable "sys_auth" going out of scope leaks the storage it points to.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 src/clnt_bcast.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/clnt_bcast.c b/src/clnt_bcast.c
index 98cf061..2ad6c89 100644
--- a/src/clnt_bcast.c
+++ b/src/clnt_bcast.c
@@ -330,6 +330,7 @@  rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp,
 	if (nettype == NULL)
 		nettype = "datagram_n";
 	if ((handle = __rpc_setconf(nettype)) == NULL) {
+		AUTH_DESTROY(sys_auth);
 		return (RPC_UNKNOWNPROTO);
 	}
 	while ((nconf = __rpc_getconf(handle)) != NULL) {