diff mbox series

[12/13] svc_generic.c: resource_leak

Message ID 20180907180151.178872-13-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 "handle" going out of scope leaks the storage it points to.

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

Patch

diff --git a/src/svc_generic.c b/src/svc_generic.c
index 52a56c2..20abaa2 100644
--- a/src/svc_generic.c
+++ b/src/svc_generic.c
@@ -113,6 +113,7 @@  svc_create(dispatch, prognum, versnum, nettype)
 				if (l == NULL) {
 					warnx("svc_create: no memory");
 					mutex_unlock(&xprtlist_lock);
+					__rpc_endconf(handle);
 					return (0);
 				}
 				l->xprt = xprt;