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

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