summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-24 18:31:16 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-10-24 18:31:16 +0200
commit37f21ef78a2d75f3a6811504d9051d1b469be80f (patch)
treefc89342f151277b18b6d146a52e16983429366fc
parenta4904ed2e437275bfd92828ad09fbb677d7225d1 (diff)
Free the iovec when canceling tasks and not only the data chunks it holds
-rw-r--r--ot_mutex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index 9aa476d..affec6b 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -114,9 +114,10 @@ void mutex_workqueue_canceltask(int64 sock) {
114 struct ot_task *ptask = *task; 114 struct ot_task *ptask = *task;
115 size_t i; 115 size_t i;
116 116
117 /* Free task's iovec */ 117 /* Free task's iovec, the buffers it points at and the vector itself */
118 for (i = 0; i < (*task)->iovec_entries; ++i) 118 for (i = 0; i < (*task)->iovec_entries; ++i)
119 free(iovec[i].iov_base); 119 free(iovec[i].iov_base);
120 free(iovec);
120 121
121 *task = (*task)->next; 122 *task = (*task)->next;
122 free(ptask); 123 free(ptask);