diff options
author | Greg Hudson <ghudson@mit.edu> | 2011-07-26 11:37:24 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2011-07-26 11:37:24 +0000 |
commit | 8372557128077659cd97b7930d3d474ea486e958 (patch) | |
tree | 2362f563297e21d8f89c841ca8d167aaa969ca8e /src/util/profile | |
parent | 3aad20ee1c70cdd216c91865529230a648bcac27 (diff) | |
download | krb5-8372557128077659cd97b7930d3d474ea486e958.tar.gz krb5-8372557128077659cd97b7930d3d474ea486e958.tar.xz krb5-8372557128077659cd97b7930d3d474ea486e958.zip |
Ensure profile_iterator always sets output params
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25057 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile')
-rw-r--r-- | src/util/profile/prof_get.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/profile/prof_get.c b/src/util/profile/prof_get.c index b2ea40ce1a..3eba787222 100644 --- a/src/util/profile/prof_get.c +++ b/src/util/profile/prof_get.c @@ -564,10 +564,6 @@ set_results(const char *name, const char *value, char **ret_name, 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 @@ profile_iterator(void **iter_p, char **ret_name, char **ret_value) 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; |