summaryrefslogtreecommitdiff
path: root/lib/isc/buffer.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2016-09-28 03:45:43 +0000
committerXin LI <delphij@FreeBSD.org>2016-09-28 03:45:43 +0000
commitc2a8859aa5c96190c179c911d3841c4de17b9c34 (patch)
treed692d2581f8989d075abe40c9f3f55f2fa650949 /lib/isc/buffer.c
parent5ef882476736cbe802bb4e6437c520162c4f44ce (diff)
Diffstat (limited to 'lib/isc/buffer.c')
-rw-r--r--lib/isc/buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c
index 2d15e248575c1..d0f08d7671133 100644
--- a/lib/isc/buffer.c
+++ b/lib/isc/buffer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008, 2012, 2014 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2012, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -462,6 +462,8 @@ isc_buffer_allocate(isc_mem_t *mctx, isc_buffer_t **dynbuffer,
length);
dbuf->mctx = mctx;
+ ENSURE(ISC_BUFFER_VALID(dbuf));
+
*dynbuffer = dbuf;
return (ISC_R_SUCCESS);