selinux/libsepol/src
Nicolas Iooss 8ccd0db860 libsepol: do not free attr_name twice
When set_to_names() fails to allocate *names, it frees variable
attr_name even though it either came from attr_list or was newly created
and added to attr_list. By doing so, the name is freed a second time
when attr_list is destroyed (with "attr_list_destroy(&attr_list)").

Avoid this double free by not freeing attr_name when it belongs to
attr_list.

This issue has been found using clang's static analyzer.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2017-04-12 14:18:35 -04:00
..
assertion.c libsepol: Fix neverallow checking to also check the other types when 2016-11-30 10:19:02 -05:00
av_permissions.h
avrule_block.c libsepol: make scope_index_destroy() more robust 2016-11-23 12:31:55 -05:00
avtab.c libsepol/cil: Add support for neverallowx 2015-12-02 15:15:03 -05:00
boolean_internal.h
boolean_record.c libsepol: do not seg fault on sepol_*_key_free(NULL) 2017-04-07 11:04:43 -04:00
booleans.c libsepol: fix __attribute__((unused)) annotations 2016-02-11 08:32:15 -05:00
conditional.c libsepol: detect duplicated symbol IDs 2016-11-29 08:43:41 -05:00
constraint.c
context_internal.h
context_record.c libsepol: fix overflow and 0 length allocations 2016-08-17 09:58:19 -04:00
context.c libsepol: fix overflow and 0 length allocations 2016-08-17 09:58:19 -04:00
context.h
debug.c libsepol: fix __attribute__((unused)) annotations 2016-02-11 08:32:15 -05:00
debug.h
dso.h libsepol: Don't use symbol versioning for static object files 2015-04-15 15:20:20 -04:00
ebitmap.c libsepol: ebitmap: reject loading bitmaps with incorrect high bit 2016-11-28 09:06:50 -05:00
expand.c libsepol: do not wrap integers when checking bound 2017-04-11 14:33:48 -04:00
genbools.c libsepol: constify sepol_genbools()'s boolpath parameter 2017-03-29 10:26:44 -04:00
genusers.c libsepol: fix unitialized variable 'nread' on mac build 2016-09-26 10:32:19 -04:00
handle.c libsepol: libsemanage: policycoreutils: Create a new preserve_tunables flag in sepol_handle_t. 2011-09-16 11:54:02 -04:00
handle.h libsepol: libsemanage: policycoreutils: Create a new preserve_tunables flag in sepol_handle_t. 2011-09-16 11:54:02 -04:00
hashtab.c libsepol: use constant keys in hashtab functions 2017-01-19 08:46:19 -05:00
hierarchy.c libsepol: Change logic of bounds checking 2016-05-04 13:29:56 -04:00
iface_internal.h
iface_record.c libsepol: do not seg fault on sepol_*_key_free(NULL) 2017-04-07 11:04:43 -04:00
interfaces.c libsepol: fix __attribute__((unused)) annotations 2016-02-11 08:32:15 -05:00
kernel_to_cil.c libsepol: Add ability to convert binary policy to CIL 2017-04-05 12:23:05 -04:00
kernel_to_common.c libsepol: Add ability to convert binary policy to CIL 2017-04-05 12:23:05 -04:00
kernel_to_common.h libsepol: Add ability to convert binary policy to CIL 2017-04-05 12:23:05 -04:00
kernel_to_conf.c libsepol: Add ability to convert binary policy to policy.conf file 2017-04-05 12:23:25 -04:00
libsepol.map.in libsepol: Add ability to convert binary policy to policy.conf file 2017-04-05 12:23:25 -04:00
libsepol.pc.in updated libselinux pkgconfig does not work correctly on lib64 machines. 2010-03-06 18:06:43 -05:00
link.c libsepol: bool_copy_callback set state on creation 2015-03-19 14:33:47 -04:00
Makefile libsepol compilation fixes for macOS. 2017-01-20 13:19:57 -05:00
mls.c libsepol,checkpolicy: convert rangetrans and filenametrans to hashtabs 2016-11-28 13:10:59 -05:00
mls.h
module_internal.h
module_to_cil.c libsepol: do not free attr_name twice 2017-04-12 14:18:35 -04:00
module.c libsepol: fix unknown magic section number error message 2016-11-23 12:31:55 -05:00
node_internal.h
node_record.c libsepol,checkpolicy,secilc: Replace #ifdef DARWIN with __APPLE__. 2016-05-03 11:54:20 -04:00
nodes.c libsepol: Add missing return to sepol_node_query() 2016-07-12 13:48:05 -04:00
polcaps.c libsepol: Define cgroup_seclabel policy capability 2017-03-02 12:39:13 -05:00
policydb_convert.c libsepol: Fix memory leak issues found by Klocwork 2013-02-05 20:14:50 -05:00
policydb_internal.h libsepol: fix most gcc -Wwrite-strings warnings 2014-10-02 09:56:15 -04:00
policydb_public.c libsepol: add function to libsepol for setting target_platform 2014-08-26 08:02:16 -04:00
policydb.c libsepol: refuse to load policies with no block 2017-04-11 14:33:04 -04:00
port_internal.h
port_record.c selinux: Add support for portcon dccp protocol 2016-04-06 10:14:27 -04:00
ports.c selinux: Build policy on systems not supporting DCCP protocol 2016-04-25 15:31:45 -04:00
private.h libsepol: port str_read from kernel 2016-08-19 13:18:02 -04:00
roles.c libsepol: use constant keys in hashtab functions 2017-01-19 08:46:19 -05:00
services.c libsepol,libselinux,audit2allow: teach audit2why about type bounds failures 2016-11-29 15:53:59 -05:00
sidtab.c
symtab.c libsepol: use constant keys in hashtab functions 2017-01-19 08:46:19 -05:00
user_internal.h
user_record.c libsepol: do not seg fault on sepol_*_key_free(NULL) 2017-04-07 11:04:43 -04:00
users.c libsepol: use constant keys in hashtab functions 2017-01-19 08:46:19 -05:00
util.c libsepol: sepol_av_to_string: clear static buffer 2016-11-29 11:20:43 -05:00
write.c libsepol: remove useless assignments 2017-01-19 08:48:36 -05:00