Some checks for return codes are missing.
Examples:
Would you like to add more error handling for return values from "pthread_mutex_lock" like in the function "alloc_get" and from "strdup" in the function "add_dir_entry"?
http://squashfs.cvs.sourceforge.net/squashfs/squashfs/squashfs-tools/mksquashfs.c?revision=1.21&view=markup