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

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