From 57d1529c604ebea4cf070ae534476afed6b9c172 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 7 Sep 2018 13:00:39 -0400 Subject: getnetpath.c: resource_leak Variable "np_sessionp" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson --- src/getnetpath.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/getnetpath.c b/src/getnetpath.c index 7c19932..ea1a18c 100644 --- a/src/getnetpath.c +++ b/src/getnetpath.c @@ -88,6 +88,7 @@ setnetpath() } if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { syslog (LOG_ERR, "rpc: failed to open " NETCONFIG); + free(np_sessionp); return (NULL); } np_sessionp->valid = NP_VALID; -- cgit v1.2.1