policycoreutils/secon: free scon_trans before returning

disp_con() leaks scon_trans if it returns early.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2018-06-03 18:25:40 +02:00 committed by Stephen Smalley
parent 0ed08c8ffe
commit b614069e66

View file

@ -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;
}