+2949. [bug] dns_view_setnewzones() contained a memory leak if
+ it was called multiple times. [RT #21942]
+
2948. [port] MacOS: provide a mechanism to configure the test
interfaces at reboot. See bin/tests/system/README
for details.
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: view.c,v 1.168 2010/08/12 04:04:14 each Exp $ */
+/* $Id: view.c,v 1.169 2010/09/06 04:31:11 marka Exp $ */
/*! \file */
REQUIRE((cfgctx != NULL && cfg_destroy != NULL) || !allow);
#ifdef BIND9
+ if (view->new_zone_file != NULL) {
+ isc_mem_free(view->mctx, view->new_zone_file);
+ view->new_zone_file = NULL;
+ }
+
+ if (view->new_zone_config != NULL) {
+ view->cfg_destroy(&view->new_zone_config);
+ view->cfg_destroy = NULL;
+ }
+
if (allow) {
char buffer[ISC_SHA256_DIGESTSTRINGLENGTH + sizeof(NZF)];
isc_sha256_data((void *)view->name, strlen(view->name), buffer);
view->new_zone_file = isc_mem_strdup(view->mctx, buffer);
view->new_zone_config = cfgctx;
view->cfg_destroy = cfg_destroy;
- } else {
- if (view->new_zone_file != NULL) {
- isc_mem_free(view->mctx, view->new_zone_file);
- view->new_zone_file = NULL;
- }
-
- if (view->new_zone_config != NULL) {
- view->cfg_destroy(&view->new_zone_config);
- view->cfg_destroy = NULL;
- }
}
#else
UNUSED(allow);