From 518e1c10bcfc96fd3164b3eec77baadcc32594b6 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Mon, 16 May 2016 14:50:13 -0400 Subject: Fix return check on gp_conv_gssx_to_name This bug was found by Coverity. Merges #25 Signed-off-by: Robbie Harwood Reviewed-by: Simo Sorce --- proxy/src/gp_creds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'proxy') diff --git a/proxy/src/gp_creds.c b/proxy/src/gp_creds.c index 551b020..446c7d8 100644 --- a/proxy/src/gp_creds.c +++ b/proxy/src/gp_creds.c @@ -580,7 +580,9 @@ uint32_t gp_add_krb5_creds(uint32_t *min, } else if (desired_name) { ret_maj = gp_conv_gssx_to_name(&ret_min, desired_name, &req_name); } - if (ret_min) { + if (ret_maj) { + goto done; + } else if (ret_min) { ret_maj = GSS_S_CRED_UNAVAIL; goto done; } -- cgit