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

48b328
From 5da6d34e2659f915e830932fd366c635801ecd91 Mon Sep 17 00:00:00 2001
48b328
From: Sumit Bose <sbose@redhat.com>
48b328
Date: Mon, 12 Aug 2019 17:28:20 +0200
48b328
Subject: [PATCH] Fix for issue found by Coverity
48b328
48b328
Related to https://gitlab.freedesktop.org/realmd/adcli/issues/3
48b328
---
48b328
 library/adenroll.c | 5 ++++-
48b328
 1 file changed, 4 insertions(+), 1 deletion(-)
48b328
48b328
diff --git a/library/adenroll.c b/library/adenroll.c
48b328
index 53cd812..524663a 100644
48b328
--- a/library/adenroll.c
48b328
+++ b/library/adenroll.c
48b328
@@ -2681,7 +2681,10 @@ adcli_enroll_get_permitted_keytab_enctypes (adcli_enroll *enroll)
48b328
 	for (c = 0; cur_enctypes[c] != 0; c++);
48b328
 
48b328
 	new_enctypes = calloc (c + 1, sizeof (krb5_enctype));
48b328
-	return_val_if_fail (new_enctypes != NULL, NULL);
48b328
+	if (new_enctypes == NULL) {
48b328
+		krb5_free_enctypes (k5, permitted_enctypes);
48b328
+		return NULL;
48b328
+	}
48b328
 
48b328
 	n = 0;
48b328
 	for (c = 0; cur_enctypes[c] != 0; c++) {
48b328
-- 
48b328
2.21.0
48b328