[ofa-general] [PATCH 6/6] [DAPL v1] fix variable not initialized early enough

Patrick Marchand Latifi patrick.latifi at qlogic.com
Wed Feb 13 14:58:18 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 541ce2a..89fc861 100644
--- a/dat/common/dat_dr.c
+++ b/dat/common/dat_dr.c
@@ -120,7 +120,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));
@@ -132,7 +132,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