Don't use calloc'd memory in struct results_data

Obviously on crash normal dynamically allocated memory will be lost, so
that won't work.
Don't overwrite file descriptor in struct results_data

Also fix mistake in sync_mask logic