diff options
author | GUO Zihua <guozihua@huawei.com> | 2022-09-21 15:58:03 +0300 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2022-11-03 01:50:48 +0300 |
commit | d57378d3aa4d864d9e590482602068af1b20c0c5 (patch) | |
tree | c444d2fba9f32bfc3432cfc0c8931cf61f44e6cc /.gitattributes | |
parent | 11220db412edae8dba58853238f53258268bdb88 (diff) | |
download | linux-d57378d3aa4d864d9e590482602068af1b20c0c5.tar.xz |
ima: Simplify ima_lsm_copy_rule
Currently ima_lsm_copy_rule() set the arg_p field of the source rule to
NULL, so that the source rule could be freed afterward. It does not make
sense for this behavior to be inside a "copy" function. So move it
outside and let the caller handle this field.
ima_lsm_copy_rule() now produce a shallow copy of the original entry
including args_p field. Meaning only the lsm.rule and the rule itself
should be freed for the original rule. Thus, instead of calling
ima_lsm_free_rule() which frees lsm.rule as well as args_p field, free
the lsm.rule directly.
Signed-off-by: GUO Zihua <guozihua@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions