selinux/libsemanage
Nicolas Iooss 033ea27c09 libsemanage: move modinfo_tmp definition before goto cleanup
In semanage_direct_set_module_info() and semanage_direct_list_all()
functions, when modinfo_tmp variable gets initialized, a branch to
"cleanup" label may have already been taken.  This leads to this
variable being possibly used uninitialized in these functions.

This is reported by clang:

    direct_api.c:2491:41: error: variable 'modinfo_tmp' may be
    uninitialized when used here [-Werror,-Wconditional-uninitialized]
            ret = semanage_module_info_destroy(sh, modinfo_tmp);
                                                   ^~~~~~~~~~~
    direct_api.c:2334:2: note: variable 'modinfo_tmp' is declared here
            semanage_module_info_t *modinfo_tmp = NULL;
            ^

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2016-02-01 08:25:13 -05:00
..
example Author: Daniel J Walsh 2008-09-15 09:25:33 -04:00
include libsemanage: Add ability to extract modules 2015-08-06 10:59:22 -04:00
man libsemanage: Add option to remove HLL files after compilation 2015-02-27 08:41:59 -05:00
src libsemanage: move modinfo_tmp definition before goto cleanup 2016-02-01 08:25:13 -05:00
tests libsemanage: fix fname[] initialization in test_utilities.c 2015-03-18 08:16:04 -04:00
utils Load libsepol.so.1 instead of libsepol.so 2015-10-28 08:54:27 -04:00
.gitignore Add subdirectory .gitignore files. 2009-10-20 21:25:55 -04:00
ChangeLog Update ChangeLog and VERSION for release candidate 2016-01-07 10:01:31 -05:00
COPYING initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libsemanage: semanage store migration script 2014-08-26 08:03:31 -04:00
VERSION Update ChangeLog and VERSION for release candidate 2016-01-07 10:01:31 -05:00