mksquashfs: write_inode_lookup_table(), remove redundant initialisation of inode

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: sort_directory(), silence bogus cur NULL pointer dereference

Static analysis reports a cur NULL pointer dereference
at the cur->next=NULL line.

This is because static analysis is too stupid to realise we'll
always go around the loop at least once, assigning cur, iff
dir->count > 1, which is checked for.  In otherwords it does
not correlate dir->count > 1 with the fact dir->list will always
be non NULL.

Even though it is strictly unnecessary, it is easily to silence
static analysers by checking for dir->list == NULL as well as
dir->count > 1.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
unsquashfs: remove_free_list(), silence bogus NULL pointer dereference

Static analysis reports a NULL pointer dereference in
remove_free_list().

This is because static analysis is too stupid to realise
if free_prev and free_next are both not NULL, then both
pointers are guaranteed to contain values.  It instead
determines a not checked for situation where one pointer can
contain a value and the other contains NULL, and flags this
as a potential NULL pointer dereference, even though this
situation cannot occur.

Even though it is strictly unnecessary, it is easily to silence
static analysers by changing the check to be free_prev == NULL ||
free_next == NULL.  The fact being it is sufficient for either
pointer to be NULL to know we have an empty list.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
action: free parse tree on SYNTAX_ERROR

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
action: parse_file_arg(), fix memory leak on TEST_SYNTAX_ERROR()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
read_fs: scan_inode_table(), fix memory leak on filesystem corruption

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>