From 3b2e5372a2017ec2b1c4924e53ab1ffc6bc15712 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 7 Sep 2018 13:36:18 -0400 Subject: rtime.c: resource_leak Handle variable "s" going out of scope leaks the handle. Signed-off-by: Steve Dickson --- src/rtime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rtime.c b/src/rtime.c index b642840..29fbf0a 100644 --- a/src/rtime.c +++ b/src/rtime.c @@ -90,6 +90,7 @@ rtime(addrp, timep, timeout) /* TCP and UDP port are the same in this case */ if ((serv = getservbyname("time", "tcp")) == NULL) { + do_close(s); return(-1); } -- cgit v1.2.1