ipc: fix use-after-free in asynchronous requests