From 8372557128077659cd97b7930d3d474ea486e958 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 26 Jul 2011 11:37:24 +0000 Subject: [PATCH] Ensure profile_iterator always sets output params git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25057 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/profile/prof_get.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/profile/prof_get.c b/src/util/profile/prof_get.c index b2ea40ce1..3eba78722 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; -- 2.26.2