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

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Jul 25 11:54:30 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25044
Commit By: ghudson
Log Message:
Restore accessor behavior on null profiles.

Prior to the pluggable configuration work, profile_get_values() and
friends would return PROF_NO_PROFILE if called with a null profile.
Restore that behavior.


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-25 15:54:26 UTC (rev 25043)
+++ trunk/src/util/profile/prof_get.c	2011-07-25 15:54:30 UTC (rev 25044)
@@ -161,6 +161,9 @@
     char                    *value;
     struct profile_string_list values;
 
+    *ret_values = NULL;
+    if (!profile)
+        return PROF_NO_PROFILE;
     if (profile->vt)
         return get_values_vt(profile, names, ret_values);
 
@@ -222,6 +225,8 @@
     char                    *value;
 
     *ret_value = NULL;
+    if (!profile)
+        return PROF_NO_PROFILE;
     if (profile->vt)
         return get_value_vt(profile, names, ret_value);
 
@@ -483,6 +488,9 @@
     errcode_t retval;
 
     *ret_iter = NULL;
+    if (!profile)
+        return PROF_NO_PROFILE;
+
     iter = malloc(sizeof(*iter));
     if (iter == NULL)
         return ENOMEM;




More information about the cvs-krb5 mailing list