Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checkpolicy: avoid assigning garbage values
Only assign the computed value on success, since it is not set by declare_symbol() on failure. Reported by GCC: module_compiler.c: In function 'create_role': module_compiler.c:287:24: warning: use of uninitialized value 'value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 287 | datum->s.value = value; | ~~~~~~~~~~~~~~~^~~~~~~ Signed-off-by: Christian Göttsche <[email protected]> Acked-by: James Carter <[email protected]>
- Loading branch information