checkpolicy - self leak
PATCH 1/1 checkpolicy - self leak
These patches fix leaks when self is the identifier, both when declared (in an error condition) and when used in an avrule.
module_compiler.c +1 -0
@@ -264,6 +262,7 @@ type_datum_t *declare_type(unsigned char }if (strcmp (id,"self" ) ==0 ) {yyerror ("'self' is a reserved type name and may not be declared." ); +free (id);return NULL ; }
policy_parse.y +1 -0
@@ -2253,6 +2255,7 @@ static int define_te_avtab_helper(int wh add = 1; while ((id = queue_remove(id_queue))) { if (strcmp(id, "self") == 0) { + free(id); avrule->flags |= RULE_SELF; continue; }