]> git.ipfire.org Git - thirdparty/bind9.git/commit
Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach
authorOndřej Surý <ondrej@sury.org>
Tue, 23 Jul 2019 21:16:57 +0000 (17:16 -0400)
committerOndřej Surý <ondrej@sury.org>
Wed, 31 Jul 2019 08:26:40 +0000 (10:26 +0200)
commita6dcdc535cabf6c80815dfd8e38f5d5504c7b5da
tree43c5e34bd21227531092ca351df2df7bd8eefaa6
parentd50256990262478f9246e6f64162da5321cd7174
Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach

Using isc_mem_put(mctx, ...) + isc_mem_detach(mctx) required juggling with the
local variables when mctx was part of the freed object. The isc_mem_putanddetach
function can handle this case internally, but it wasn't used everywhere.  This
commit apply the semantic patching plus bit of manual work to replace all such
occurrences with proper usage of isc_mem_putanddetach().
13 files changed:
lib/dns/db.c
lib/dns/dispatch.c
lib/dns/dlz.c
lib/dns/forward.c
lib/dns/master.c
lib/dns/request.c
lib/dns/sdb.c
lib/dns/sdlz.c
lib/dns/tkey.c
lib/dns/zone.c
lib/isc/timer.c
lib/isc/unix/socket.c
lib/isc/win32/socket.c