[01/13] auth_gss.c: resource_leak
diff mbox series

Message ID 20180907180151.178872-2-steved@redhat.com
State New
Headers show
Series
  • libtirpc: Closed a number of memory leaks
Related show

Commit Message

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

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

Patch
diff mbox series

diff --git a/src/auth_gss.c b/src/auth_gss.c
index 5959893..289bd5b 100644
--- a/src/auth_gss.c
+++ b/src/auth_gss.c
@@ -207,6 +207,7 @@  authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec)
 			rpc_createerr.cf_stat = RPC_SYSTEMERROR;
 			rpc_createerr.cf_error.re_errno = ENOMEM;
 			free(auth);
+			free(gd);
 			return (NULL);
 		}
 	}