[PATCH 12/13] svc_generic.c: resource_leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Variable "handle" going out of scope leaks the storage it points to.

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

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;
-- 
2.17.1




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux