svn rev #25057: trunk/src/util/profile/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Jul 26 07:37:24 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25057
Commit By: ghudson
Log Message:
Ensure profile_iterator always sets output params.


Changed Files:
U   trunk/src/util/profile/prof_get.c
Modified: trunk/src/util/profile/prof_get.c
===================================================================
--- trunk/src/util/profile/prof_get.c	2011-07-26 11:28:13 UTC (rev 25056)
+++ trunk/src/util/profile/prof_get.c	2011-07-26 11:37:24 UTC (rev 25057)
@@ -564,10 +564,6 @@
 oom:
     free(name_copy);
     free(value_copy);
-    if (ret_name)
-        *ret_name = NULL;
-    if (ret_value)
-        *ret_value = NULL;
     return ENOMEM;
 }
 
@@ -579,6 +575,10 @@
     struct profile_iterator *iter = *iter_p;
     profile_t profile;
 
+    if (ret_name)
+        *ret_name = NULL;
+    if (ret_value)
+        *ret_value = NULL;
     if (iter->magic != PROF_MAGIC_ITERATOR)
         return PROF_MAGIC_ITERATOR;
     profile = iter->profile;




More information about the cvs-krb5 mailing list