summaryrefslogtreecommitdiff
path: root/usr.sbin/ypserv
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-11 17:22:16 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-11 17:22:16 +0000
commit65daa4cc5dc6abc84977fb3fbde7d0d91ef01c14 (patch)
tree316b82c1d8e9daa09d794f8dcecd3600f602efce /usr.sbin/ypserv
parentef6aaa78687936aaf14cd35f02597cc7c7c7f99f (diff)
plug db descriptor leak
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv_db.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/ypserv/ypserv_db.c b/usr.sbin/ypserv/ypserv/ypserv_db.c
index b2570cbe740..5b86c22fbec 100644
--- a/usr.sbin/ypserv/ypserv/ypserv_db.c
+++ b/usr.sbin/ypserv/ypserv/ypserv_db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypserv_db.c,v 1.7 1996/09/29 08:11:04 dm Exp $ */
+/* $OpenBSD: ypserv_db.c,v 1.8 1996/11/11 17:22:15 niklas Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -34,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.7 1996/09/29 08:11:04 dm Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.8 1996/11/11 17:22:15 niklas Exp $";
#endif
/*
@@ -489,7 +489,7 @@ ypdb_get_record(domain, map, key, ypprivate)
res.stat = YP_NOKEY;
if ((hn = strcmp(map, YP_HOSTNAME)) != 0 &&
strcmp(map, YP_HOSTADDR) != 0)
- return(res);
+ goto done;
/* note: lookup_host needs null terminated string */
strncpy(keystr, key.keydat_val, key.keydat_len);
keystr[key.keydat_len] = '\0';