Blame SOURCES/0005-libsepol-cil-Set-class-field-to-NULL-when-resetting-.patch

060220
From 6beea9f422cb452c01a24619247b559b67a4aeec Mon Sep 17 00:00:00 2001
060220
From: James Carter <jwcart2@gmail.com>
060220
Date: Thu, 8 Apr 2021 13:32:08 -0400
060220
Subject: [PATCH] libsepol/cil: Set class field to NULL when resetting struct
060220
 cil_classperms
060220
060220
The class field of a struct cil_classperms points to the class looked
060220
up in the symbol table, so that field should be set to NULL when
060220
the cil_classperms is reset.
060220
060220
Set the class field to NULL when resetting the struct cil_classperms.
060220
060220
Signed-off-by: James Carter <jwcart2@gmail.com>
060220
---
060220
 libsepol/cil/src/cil_reset_ast.c | 1 +
060220
 1 file changed, 1 insertion(+)
060220
060220
diff --git a/libsepol/cil/src/cil_reset_ast.c b/libsepol/cil/src/cil_reset_ast.c
060220
index 7bf0391b..e86ee3b8 100644
060220
--- a/libsepol/cil/src/cil_reset_ast.c
060220
+++ b/libsepol/cil/src/cil_reset_ast.c
060220
@@ -43,6 +43,7 @@ static inline void cil_reset_classperms(struct cil_classperms *cp)
060220
 		return;
060220
 	}
060220
 
060220
+	cp->class = NULL;
060220
 	cil_list_destroy(&cp->perms, CIL_FALSE);
060220
 }
060220
 
060220
-- 
060220
2.30.2
060220