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

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