rpc_read_from_socket: fix use-after-free due to missing return