+1240. [bug] It was possible to leak zone references by
+ specifying an incorrect zone to rndc.
+
1239. [bug] Under certain circumstances named could continue to
use a name after it had been freed triggering
INSIST() failures. [RT #2614]
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.339.2.4 2002/02/08 03:57:13 marka Exp $ */
+/* $Id: server.c,v 1.339.2.5 2002/03/29 01:35:24 marka Exp $ */
#include <config.h>
/* Look for the zone name. */
zonetxt = next_token(&input, " \t");
- if (zonetxt == NULL) {
- *zonep = NULL;
+ if (zonetxt == NULL)
return (ISC_R_SUCCESS);
- }
/* Look for the optional class name. */
classtxt = next_token(&input, " \t");
result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
0, NULL, zonep);
- if (result != ISC_R_SUCCESS)
- goto fail2;
- fail2:
+ /* Partial match? */
+ if (result != ISC_R_SUCCESS && *zonep != NULL)
+ dns_zone_detach(zonep);
dns_view_detach(&view);
fail1:
return (result);