From a58d1ce3757a13356e69cbb5893b70c8a9c425c7 Mon Sep 17 00:00:00 2001 From: Michael Sawyer Date: Tue, 27 Jun 2000 21:59:44 +0000 Subject: [PATCH] Uninitialized variable --- bin/nsupdate/nsupdate.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 2bb665c6be..da737c0d76 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: nsupdate.c,v 1.8 2000/06/23 20:46:25 mws Exp $ */ +/* $Id: nsupdate.c,v 1.9 2000/06/27 21:59:44 mws Exp $ */ #include #include @@ -287,12 +287,6 @@ setup_system(){ result = isc_mem_create(0, 0, &mctx); check_result(result, "isc_mem_create"); - result = isc_taskmgr_create (mctx, 1, 0, &taskmgr); - check_result(result, "isc_taskmgr_create"); - - result = isc_task_create (taskmgr, 0, &global_task); - check_result(result, "isc_task_create"); - result = dns_dispatchmgr_create(mctx, NULL, &dispatchmgr); check_result(result, "dns_dispatchmgr_create"); @@ -302,6 +296,12 @@ setup_system(){ result = isc_timermgr_create(mctx, &timermgr); check_result(result, "dns_timermgr_create"); + result = isc_taskmgr_create (mctx, 1, 0, &taskmgr); + check_result(result, "isc_taskmgr_create"); + + result = isc_task_create (taskmgr, 0, &global_task); + check_result(result, "isc_task_create"); + result = isc_entropy_create (mctx, &entp); check_result(result, "isc_entropy_create"); @@ -691,7 +691,7 @@ update_add() { char *ptr, *type, *data; dns_rdatatype_t rdatatype; dns_rdatacallbacks_t callbacks; - dns_rdata_t *rdata; + dns_rdata_t *rdata = NULL; dns_rdatalist_t *rdatalist = NULL; dns_rdataset_t *rdataset = NULL; isc_textregion_t region; @@ -1309,20 +1309,18 @@ free_lists() { ddebug("Shutting down dispatch manager"); dns_dispatchmgr_destroy(&dispatchmgr); - ddebug("Shutting down socket manager"); - isc_socketmgr_destroy(&socketmgr); - - sleep (1); - - ddebug("Shutting down timer manager"); - isc_timermgr_destroy(&timermgr); - ddebug("Ending task"); isc_task_detach(&global_task); ddebug("Shutting down task manager"); isc_taskmgr_destroy(&taskmgr); + ddebug("Shutting down socket manager"); + isc_socketmgr_destroy(&socketmgr); + + ddebug("Shutting down timer manager"); + isc_timermgr_destroy(&timermgr); + ddebug("Destroying memory context"); if (isc_mem_debugging) isc_mem_stats(mctx, stderr);