In get_last_url(), add a missing check for strdup()'s return code