mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-15 22:09:31 -04:00
lib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before NULL check
This commit is contained in:
parent
8f2ad12d0a
commit
e9f30fc211
1 changed files with 2 additions and 1 deletions
|
|
@ -550,10 +550,11 @@ isc_buffer_allocate(isc_mem_t *mctx, isc_buffer_t **dynbuffer,
|
|||
bdata = isc_mem_get(mctx, length);
|
||||
|
||||
isc_buffer_init(dbuf, bdata, length);
|
||||
dbuf->mctx = mctx;
|
||||
|
||||
ENSURE(ISC_BUFFER_VALID(dbuf));
|
||||
|
||||
dbuf->mctx = mctx;
|
||||
|
||||
*dynbuffer = dbuf;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue