summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/named/ns_xfr.c
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2001-07-30 16:51:36 +0000
committerasmodai <asmodai@FreeBSD.org>2001-07-30 16:51:36 +0000
commit4764c8658fdd2787fdd421279037fe93eb05ac7c (patch)
tree575f66c4e2766172b1fb832ef43000016e089b3c /contrib/bind/bin/named/ns_xfr.c
parentc56e32d41edb68ef6a2360025bff9df4a544e5fa (diff)
downloadFreeBSD-src-4764c8658fdd2787fdd421279037fe93eb05ac7c.zip
FreeBSD-src-4764c8658fdd2787fdd421279037fe93eb05ac7c.tar.gz
Virgin import of BIND v8.2.4-REL
Diffstat (limited to 'contrib/bind/bin/named/ns_xfr.c')
-rw-r--r--contrib/bind/bin/named/ns_xfr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/bind/bin/named/ns_xfr.c b/contrib/bind/bin/named/ns_xfr.c
index 5c05fe0..836195b 100644
--- a/contrib/bind/bin/named/ns_xfr.c
+++ b/contrib/bind/bin/named/ns_xfr.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_xfr.c,v 8.63 2000/12/23 08:14:43 vixie Exp $";
+static const char rcsid[] = "$Id: ns_xfr.c,v 8.64 2001/02/15 00:18:46 marka Exp $";
#endif /* not lint */
/*
@@ -117,8 +117,10 @@ ns_xfr(struct qstream *qsp, struct namebuf *znp,
(void) setsockopt(qsp->s_rfd, SOL_SOCKET, SO_SNDLOWAT,
(char *)&sndlowat, sizeof sndlowat);
#endif
- if (sq_openw(qsp, 64*1024) == -1)
+ if (sq_openw(qsp, 64*1024) == -1) {
+ ns_error(ns_log_xfer_out, "ns_xfr: out of memory");
goto abort;
+ }
memset(&qsp->xfr, 0, sizeof qsp->xfr);
qsp->xfr.top.axfr = znp;
qsp->xfr.zone = zone;
@@ -129,8 +131,10 @@ ns_xfr(struct qstream *qsp, struct namebuf *znp,
qsp->xfr.id = id;
qsp->xfr.opcode = opcode;
qsp->xfr.msg = memget(XFER_BUFSIZE);
- if (!qsp->xfr.msg)
+ if (!qsp->xfr.msg) {
+ ns_error(ns_log_xfer_out, "ns_xfr: out of memory");
goto abort;
+ }
qsp->xfr.eom = qsp->xfr.msg + XFER_BUFSIZE;
qsp->xfr.cp = NULL;
qsp->xfr.state = s_x_firstsoa;
@@ -199,6 +203,7 @@ ns_xfr(struct qstream *qsp, struct namebuf *znp,
}
} else {
if (sx_pushlev(qsp, znp) < 0) {
+ ns_error(ns_log_xfer_out, "ns_xfr: out of memory");
abort:
(void) shutdown(qsp->s_rfd, 2);
sq_remove(qsp);
OpenPOWER on IntegriCloud