Just complete the request with SD_RES_OLD_NODE_VER instead of trying to
call the end_io handler to do that, which causes a list deletion while
the request hasn't been added to any list.

diff --git a/sheep/sdnet.c b/sheep/sdnet.c
index d9882b1..5e216c4 100644
--- a/sheep/sdnet.c
+++ b/sheep/sdnet.c
@@ -207,7 +207,7 @@ static int check_request_epoch(struct request *req)
 		/* ask gateway to retry. */
 		req->rp.result = SD_RES_OLD_NODE_VER;
 		req->rp.epoch = sys->epoch;
-		req->work.done(&req->work);
+		req_done(req);
 		return -1;
 	} else if (after(req->rq.epoch, sys->epoch)) {
 		eprintf("new node version %u, %u, %x\n",


