diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2004-07-08 06:20:47 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2004-07-08 06:20:47 +0000 |
commit | 2e13687ea23333acaa7c96208fbdbe01ed286179 (patch) | |
tree | 4fa134b65c4f0d1adb4ad79f08b9014aa075f52d | |
parent | 15107a6ef9d22e33dc18c38a4cd73e4fdd0fa33e (diff) |
Don't close the database too early. ok deraadt@, millert@.
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c index 17ea1085305..b5aab324b3a 100644 --- a/usr.sbin/ypserv/ypxfr/ypxfr.c +++ b/usr.sbin/ypserv/ypxfr/ypxfr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypxfr.c,v 1.31 2003/07/15 06:10:46 deraadt Exp $ */ +/* $OpenBSD: ypxfr.c,v 1.32 2004/07/08 06:20:46 matthieu Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -27,7 +27,7 @@ */ #ifndef LINT -static const char rcsid[] = "$OpenBSD: ypxfr.c,v 1.31 2003/07/15 06:10:46 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: ypxfr.c,v 1.32 2004/07/08 06:20:46 matthieu Exp $"; #endif #include <sys/types.h> @@ -120,7 +120,6 @@ get_local_ordernum(char *domain, char *map, u_int32_t *lordernum) k.dsize = YP_LAST_LEN; v = ypdb_fetch(db, k); - ypdb_close(db); if (v.dptr == NULL) { *lordernum = 0; @@ -129,6 +128,7 @@ get_local_ordernum(char *domain, char *map, u_int32_t *lordernum) *lordernum = (u_int32_t)atol(order); } + ypdb_close(db); bail: if (status == YPPUSH_NOMAP || status == YPPUSH_DBM) { *lordernum = 0; |