Blame SOURCES/0001-Fix-for-issues-found-by-Coverity.patch

59dcbd
From 3c93c96eb6ea2abd3869921ee4c89e1a4d9e4c44 Mon Sep 17 00:00:00 2001
59dcbd
From: Sumit Bose <sbose@redhat.com>
59dcbd
Date: Tue, 14 Aug 2018 13:08:52 +0200
59dcbd
Subject: [PATCH] Fix for issues found by Coverity
59dcbd
59dcbd
---
59dcbd
 library/adenroll.c | 12 ++++++------
59dcbd
 1 file changed, 6 insertions(+), 6 deletions(-)
59dcbd
59dcbd
diff --git a/library/adenroll.c b/library/adenroll.c
59dcbd
index 02bd9e3..de2242a 100644
59dcbd
--- a/library/adenroll.c
59dcbd
+++ b/library/adenroll.c
59dcbd
@@ -1575,7 +1575,7 @@ load_host_keytab (adcli_enroll *enroll)
59dcbd
 	}
59dcbd
 
59dcbd
 	krb5_free_context (k5);
59dcbd
-	return ADCLI_SUCCESS;
59dcbd
+	return res;
59dcbd
 }
59dcbd
 
59dcbd
 typedef struct {
59dcbd
@@ -1756,12 +1756,12 @@ add_principal_to_keytab (adcli_enroll *enroll,
59dcbd
 		                                       enroll->kvno, &password, enctypes, &salts[*which_salt]);
59dcbd
 
59dcbd
 		free_principal_salts (k5, salts);
59dcbd
+	}
59dcbd
 
59dcbd
-		if (code != 0) {
59dcbd
-			_adcli_err ("Couldn't add keytab entries: %s: %s",
59dcbd
-			            enroll->keytab_name, krb5_get_error_message (k5, code));
59dcbd
-			return ADCLI_ERR_FAIL;
59dcbd
-		}
59dcbd
+	if (code != 0) {
59dcbd
+		_adcli_err ("Couldn't add keytab entries: %s: %s",
59dcbd
+		            enroll->keytab_name, krb5_get_error_message (k5, code));
59dcbd
+		return ADCLI_ERR_FAIL;
59dcbd
 	}
59dcbd
 
59dcbd
 
59dcbd
-- 
59dcbd
2.21.0
59dcbd