Check return values of malloc and archive_read_new