This is an automated email from the git hooks/post-receive script.
rharwood pushed a change to branch master in repository gssproxy.
from eae0011 Fix most memory leaks new eb880e9 Fix error handling in gp_config_from_dir
The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference.
Summary of changes: proxy/src/gp_config.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
This is an automated email from the git hooks/post-receive script.
rharwood pushed a commit to branch master in repository gssproxy.
commit eb880e93ed4a48c67ac27b4d5194f0f7786da83e Author: Alexander Scheel ascheel@redhat.com Date: Wed Jul 12 09:26:52 2017 -0400
Fix error handling in gp_config_from_dir
Signed-off-by: Alexander Scheel ascheel@redhat.com [rharwood@redhat.com: c99, refactor some existing code] Reviewed-by: Robbie Harwood rharwood@redhat.com Merges: #204 --- proxy/src/gp_config.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c index 8ea49d2..721598f 100644 --- a/proxy/src/gp_config.c +++ b/proxy/src/gp_config.c @@ -823,17 +823,21 @@ static int gp_config_from_dir(const char *config_dir, &error_list, NULL); if (ret) { - if (error_list) { - uint32_t i; - uint32_t len = ref_array_getlen(error_list, &i); - for (i = 0; i < len; i++) { - GPDEBUG("Error when reading config directory: %s\n", - (const char *) ref_array_get(error_list, i, NULL)); - } - ref_array_destroy(error_list); - } else { - GPDEBUG("Error when reading config directory number: %d\n", ret); + uint32_t len; + + if (!error_list) { + GPAUDIT("Error when reading config directory number: %d\n", ret); + return ret; } + + len = ref_array_len(error_list); + for (uint32_t i = 0; i < len; i++) { + /* libini has an unfixable bug where error strings are (char **) */ + GPAUDIT("Error when reading config directory: %s\n", + *(char **)ref_array_get(error_list, i, NULL)); + } + + ref_array_destroy(error_list); return ret; }
gss-proxy@lists.fedorahosted.org