summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iscsid/task.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2014-05-10 11:28:02 +0000
committerclaudio <claudio@openbsd.org>2014-05-10 11:28:02 +0000
commitbb7fde4eb499e35fa8d42b21dd3965ab16f36437 (patch)
tree8ba3317b27686cfad95e4428a43cd90382895b14 /usr.sbin/iscsid/task.c
parentFactor out the common ast bits into mi_ast() (diff)
downloadwireguard-openbsd-bb7fde4eb499e35fa8d42b21dd3965ab16f36437.tar.xz
wireguard-openbsd-bb7fde4eb499e35fa8d42b21dd3965ab16f36437.zip
Move the task cleanup from the task fail callback to taskq_cleanup.
This makes the one failure callback a lot simpler.
Diffstat (limited to 'usr.sbin/iscsid/task.c')
-rw-r--r--usr.sbin/iscsid/task.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/iscsid/task.c b/usr.sbin/iscsid/task.c
index 221cabd5ff1..4c12e21f222 100644
--- a/usr.sbin/iscsid/task.c
+++ b/usr.sbin/iscsid/task.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: task.c,v 1.9 2011/04/28 18:32:01 claudio Exp $ */
+/* $OpenBSD: task.c,v 1.10 2014/05/10 11:28:02 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -65,10 +65,8 @@ taskq_cleanup(struct taskq *tq)
TAILQ_REMOVE(tq, t, entry);
if (t->failback)
t->failback(t->callarg);
- else {
- conn_task_cleanup(NULL, t);
- free(t);
- }
+ conn_task_cleanup(NULL, t);
+ free(t);
}
}