From ee21a175ecfa821b74822881d354c7f848930738 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Mon, 10 Oct 2022 11:18:50 -0700 Subject: apparmor: fix uninitialize table variable in error in unpack_trans_table The error path has one case where *table is uninitialized, initialize it. Fixes: a0792e2ceddc ("apparmor: make transition table unpack generic so it can be reused") Reported-by: kernel test robot Signed-off-by: John Johansen --- security/apparmor/policy_unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security/apparmor') diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index 09f316943951..3b956b1235f3 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c @@ -477,7 +477,7 @@ static struct aa_dfa *unpack_dfa(struct aa_ext *e, int flags) static bool unpack_trans_table(struct aa_ext *e, struct aa_str_table *strs) { void *saved_pos = e->pos; - char **table; + char **table = NULL; /* exec table is optional */ if (unpack_nameX(e, AA_STRUCT, "xtable")) { -- cgit v1.2.3