From edd7bbd111538500c8db16ba19ce6bf6f99bb5eb Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Sun, 23 Nov 2014 13:05:52 +0000 Subject: 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. --- usr.sbin/iscsid/pdu.c | 4 ++-- 1 file 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 @@ -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: -- cgit v1.2.3