request: fix race condition by protecting pointer access