[ofa-general] [PATCH 5/5] [DAPL v2] Fix variable not initialized early enough

Patrick Marchand Latifi patrick.latifi at qlogic.com
Wed Feb 13 15:00:27 PST 2008


Make sure we initialize the dictionary entry early enough so that
we can base our cleanup decisions on that variable being
initialized.

Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
---

 dat/common/dat_dr.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dat/common/dat_dr.c b/dat/common/dat_dr.c
index 6d79829..bda3002 100644
--- a/dat/common/dat_dr.c
+++ b/dat/common/dat_dr.c
@@ -119,7 +119,7 @@ dat_dr_insert (
     IN  DAT_DR_ENTRY 		*entry )
 {
     DAT_RETURN 			status;
-    DAT_DICTIONARY_ENTRY 	dict_entry;
+    DAT_DICTIONARY_ENTRY 	dict_entry = NULL;
     DAT_DR_ENTRY		*data;
 
     data = dat_os_alloc (sizeof (DAT_DR_ENTRY));
@@ -131,7 +131,6 @@ dat_dr_insert (
 
     *data = *entry;
 
-    dict_entry = NULL;
     status = dat_dictionary_entry_create (&dict_entry);
     if ( DAT_SUCCESS != status )
     {




More information about the general mailing list