commit | 85da6194ea6777dc840dc7c9e6770043e9633674 | [log] [tgz] |
---|---|---|
author | Nicolas Iooss <nicolas.iooss@m4x.org> | Tue Mar 28 23:41:51 2017 +0200 |
committer | James Carter <jwcart2@tycho.nsa.gov> | Wed Mar 29 10:26:55 2017 -0400 |
tree | e1bae33dbae1a3d9026327ada8cf38e031330854 | |
parent | 0438d5c4212e1f306525c5142619ac79a8b20e02 [diff] |
libsemanage: do not dereference a NULL pointer when calloc() fails If "names = calloc(num_modinfos, sizeof(*names))" fails in semanage_get_cil_paths(), the function tries to frees items in array "names" even though it is NULL. Avoid this by returning directly. This issue has been found using clang's static analyzer. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>