commit | 03298a22f7dc6f45885307976d09c9a2f070f9fd | [log] [tgz] |
---|---|---|
author | Nicolas Iooss <[email protected]> | Tue Mar 28 23:41:52 2017 +0200 |
committer | James Carter <[email protected]> | Wed Mar 29 10:26:59 2017 -0400 |
tree | f726d6469cf9ee3471dae4d592721baa71078bda | |
parent | 85da6194ea6777dc840dc7c9e6770043e9633674 [diff] |
libsemanage: genhomedircon: fix possible double-free When write_contexts() frees variables context and new_context_str after a line has been successfully emitted, these variables are not reset to NULL. This leads the function to free them again if an error occurs when processing the next line. Fix this by always resetting these variables at the beginning of the loop. This issue has been found using clang's static analyzer. Signed-off-by: Nicolas Iooss <[email protected]>