diff options
author | John Johansen <john.johansen@canonical.com> | 2022-10-10 11:18:50 -0700 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2022-10-10 11:18:50 -0700 |
commit | ee21a175ecfa821b74822881d354c7f848930738 (patch) | |
tree | 8a2c0dab37cb783ea5a07a254e5c62370ecf0345 /security | |
parent | 5515a8e30eaa8ae0d57ec59c908716cf2af114ae (diff) |
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 <lkp@intel.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/policy_unpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
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")) { |