pcrs_execute(): Consistently set *result to NULL in case of errors