Blame SOURCES/0003-libsepol-cil-Destroy-classperm-list-when-resetting-m.patch

060220
From 8c8a21d4ca75e4b767d3dfaa181a83e4c0e1f3a1 Mon Sep 17 00:00:00 2001
060220
From: James Carter <jwcart2@gmail.com>
060220
Date: Thu, 8 Apr 2021 13:32:04 -0400
060220
Subject: [PATCH] libsepol/cil: Destroy classperm list when resetting map perms
060220
060220
Map perms share the same struct as regular perms, but only the
060220
map perms use the classperms field. This field is a pointer to a
060220
list of classperms that is created and added to when resolving
060220
classmapping rules, so the map permission doesn't own any of the
060220
data in the list and this list should be destroyed when the AST is
060220
reset.
060220
060220
When resetting a perm, destroy the classperms list without destroying
060220
the data in the list.
060220
060220
Signed-off-by: James Carter <jwcart2@gmail.com>
060220
060220
(cherry-picked from SElinuxProject
060220
 commit: 2d35fcc7e9e976a2346b1de20e54f8663e8a6cba)
060220
---
060220
 libsepol/cil/src/cil_reset_ast.c | 2 +-
060220
 1 file changed, 1 insertion(+), 1 deletion(-)
060220
060220
diff --git a/libsepol/cil/src/cil_reset_ast.c b/libsepol/cil/src/cil_reset_ast.c
060220
index 73e1fcf0..f321b396 100644
060220
--- a/libsepol/cil/src/cil_reset_ast.c
060220
+++ b/libsepol/cil/src/cil_reset_ast.c
060220
@@ -34,7 +34,7 @@ static void cil_reset_class(struct cil_class *class)
060220
 
060220
 static void cil_reset_perm(struct cil_perm *perm)
060220
 {
060220
-	cil_reset_classperms_list(perm->classperms);
060220
+	cil_list_destroy(&perm->classperms, CIL_FALSE);
060220
 }
060220
 
060220
 static inline void cil_reset_classperms(struct cil_classperms *cp)
060220
-- 
060220
2.30.2
060220