mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-29 09:22:06 +00:00
libsemanage: Fix use of unitialized variable
"gcc -O2 -Wall -Werror" fails to compile seusers_local.c: seusers_local.c: In function 'semanage_seuser_modify_local': seusers_local.c:122:6: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized] It seems rc is not initialized when the call to semanage_seuser_clone fails in semanage_seuser_modify_local. Acked-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
parent
278ae562d6
commit
9a6091479d
@ -131,7 +131,8 @@ int semanage_seuser_modify_local(semanage_handle_t * handle,
|
||||
errno=EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (semanage_seuser_clone(handle, data, &new) < 0) {
|
||||
rc = semanage_seuser_clone(handle, data, &new);
|
||||
if (rc < 0) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user