secilc/secilcheck: Remove extra sepol_policydb_free(pdb)
PATCH 1/1 secilc/secilcheck: Remove extra sepol_policydb_free(pdb)
Since sepol_policydb_free() gets called at the end regardless, do not need to call it in the error path.
Signed-off-by James Carter <[email protected]>
--- secilc/secilcheck.c | 1 - 1 file changed, 1 deletion(-)
secilc/secilcheck.c +0 -1
@@ -78,7 +78,6 @@ static int get_binary_policy_db(const char *filename, sepol_policydb_t *pdb)if (sepol_policydb_read (pdb, pf) <0 ) {fprintf (stderr,"Error reading binary policy: %s\n" , filename); -sepol_policydb_free (pdb); rc =SEPOL_ERR ; goto exit; }
Signature · 1 line
2.54.0
Quoted 5 lines · James Carter
Since
sepol_policydb_free()gets called at the end regardless, do not need to call it in the error path.Signed-off-by James Carter <[email protected]>
Acked-by Stephen Smalley <[email protected]>
Quoted 20 lines
--- secilc/secilcheck.c | 1 - 1 file changed, 1 deletion(-)secilc/secilcheck.c +0
-2@@ -78,7 +78,6 @@ static int get_binary_policy_db(const char *filename, sepol_policydb_t *pdb)if (sepol_policydb_read (pdb, pf) <0 ) {fprintf (stderr,"Error reading binary policy: %s\n" , filename); -sepol_policydb_free (pdb); rc =SEPOL_ERR ; goto exit; } --2.54.0
Quoted 10 lines · Stephen Smalley
Quoted 5 lines · James Carter
Since
sepol_policydb_free()gets called at the end regardless, do not need to call it in the error path.Signed-off-by James Carter <[email protected]>Acked-by Stephen Smalley <[email protected]>
Merged.
Jim
Quoted 20 lines
Quoted 20 lines
--- secilc/secilcheck.c | 1 - 1 file changed, 1 deletion(-)secilc/secilcheck.c +0
-2@@ -78,7 +78,6 @@ static int get_binary_policy_db(const char *filename, sepol_policydb_t *pdb)if (sepol_policydb_read (pdb, pf) <0 ) {fprintf (stderr,"Error reading binary policy: %s\n" , filename); -sepol_policydb_free (pdb); rc =SEPOL_ERR ; goto exit; } --2.54.0