summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2018-09-07 13:00:39 -0400
committerSteve Dickson <steved@redhat.com>2018-09-11 11:58:11 -0400
commit57d1529c604ebea4cf070ae534476afed6b9c172 (patch)
tree94602e9ca0c0832962a376177cec5058aafd8235 /src
parenta1fae253053bde4786a40c7ac1ba05f53d78398f (diff)
downloadti-rpc-57d1529c604ebea4cf070ae534476afed6b9c172.tar.gz
getnetpath.c: resource_leak
Variable "np_sessionp" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/getnetpath.c1
1 files changed, 1 insertions, 0 deletions
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;