selinux-refpolicy/support
Guido Trentalancia 5490639ac9 fc_sort: memory leakages
Avoid memory leakages in the fc_sort executable (now passes
all valgrind AND Clang static analyzer tests fine).

Some NULL pointer checks with or without associated error
reporting.

Some white space and comment formatting fixes.

Optimization: avoid unnecessary operations (unnecessary
memory allocation/deallocation and list copying).

Reverts 7821eb6f37 as such
trick is no longer needed, given that all memory leakages
have now been fixed.

This is the sixth version of this patch. Please do not use
the first version as it introduces a serious bug.

For reference, the original issue reported by the Cland
static analyzer is as follows:

support/fc_sort.c:494:6: warning: Potential leak of memory
pointed to by 'head'
            malloc(sizeof(file_context_bucket_t));

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
Acked-by: William Roberts <william.c.roberts@intel.com>
2017-10-04 19:29:47 -04:00
..
Makefile.devel Strip spaces from NAME 2017-08-31 21:19:32 -04:00
comment_move_decl.sed refpolicy: Infiniband pkeys and endports 2017-05-24 19:23:18 -04:00
divert.m4 Fix infrastructure to expand macros in initrc_context when installing. 2009-08-10 14:00:34 -04:00
fatal_error.m4 m4 errprint: add __program__ info 2017-03-08 17:16:27 +01:00
fc_sort.c fc_sort: memory leakages 2017-10-04 19:29:47 -04:00
genclassperms.py convert build scripts to python3 2017-03-15 02:09:20 +01:00
genhomedircon.py fix travis and genhomedircon 2017-03-18 18:38:20 +01:00
gennetfilter.py convert build scripts to python3 2017-03-15 02:09:20 +01:00
get_type_attr_decl.sed Move role declarations to the top of base.conf 2012-02-29 12:08:22 -05:00
iferror.m4 trunk: Add iferror.m4 rather generate it out of the Makefiles. 2008-03-06 20:17:46 +00:00
policyvers.py fix travis and genhomedircon 2017-03-18 18:38:20 +01:00
pyplate.py Use raw strings in regular expressions 2017-04-08 12:29:07 +02:00
sedoctool.py convert build scripts to python3 2017-03-15 02:09:20 +01:00
segenxml.py Use raw strings in regular expressions 2017-04-08 12:29:07 +02:00
selinux-policy-refpolicy.spec remove trailing whitespaces 2016-12-06 13:45:13 +01:00
selinux-refpolicy-sources.spec.skel remove trailing whitespaces 2016-12-06 13:45:13 +01:00
set_bools_tuns.awk remove trailing whitespaces 2016-12-06 13:45:13 +01:00
undivert.m4 Fix infrastructure to expand macros in initrc_context when installing. 2009-08-10 14:00:34 -04:00