From b614069e66eb0cd1d3f8d0c9d0a02db9a63aba0a Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sun, 3 Jun 2018 18:25:40 +0200 Subject: [PATCH] policycoreutils/secon: free scon_trans before returning disp_con() leaks scon_trans if it returns early. Signed-off-by: Nicolas Iooss --- policycoreutils/secon/secon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/policycoreutils/secon/secon.c b/policycoreutils/secon/secon.c index 60781394..477057a6 100644 --- a/policycoreutils/secon/secon.c +++ b/policycoreutils/secon/secon.c @@ -646,6 +646,7 @@ static void disp_con(security_context_t scon_raw) disp__con_val("clearance", NULL, &color); if (opts->disp_mlsr) disp__con_val("mls-range", NULL, &color); + freecon(scon_trans); return; }