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

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