summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2014-11-23 13:05:52 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2014-11-23 13:05:52 +0000
commitedd7bbd111538500c8db16ba19ce6bf6f99bb5eb (patch)
tree30410cf4284ffa1f3ae5d95918814cd2fb6501f3
parentb9f37767a32a97e81aa31ef0801173ffa0166b59 (diff)
Clear the work in progress PDU before calling the task handler.
This ensures that we don't have multiple pointers pointing to the same PDU.
-rw-r--r--usr.sbin/iscsid/pdu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/iscsid/pdu.c b/usr.sbin/iscsid/pdu.c
index a73c19e2ccb..e6dffce12ab 100644
--- a/usr.sbin/iscsid/pdu.c
+++ b/usr.sbin/iscsid/pdu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdu.c,v 1.9 2014/04/21 12:26:50 claudio Exp $ */
+/* $OpenBSD: pdu.c,v 1.10 2014/11/23 13:05:51 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -393,8 +393,8 @@ pdu_parse(struct connection *c)
}
}
p->resid = 0; /* reset resid so pdu can be reused */
- task_pdu_cb(c, p);
c->prbuf.wip = NULL;
+ task_pdu_cb(c, p);
}
} while (1);
fail: