diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-24 18:31:16 +0200 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-24 18:31:16 +0200 |
| commit | 37f21ef78a2d75f3a6811504d9051d1b469be80f (patch) | |
| tree | fc89342f151277b18b6d146a52e16983429366fc | |
| parent | a4904ed2e437275bfd92828ad09fbb677d7225d1 (diff) | |
Free the iovec when canceling tasks and not only the data chunks it holds
| -rw-r--r-- | ot_mutex.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -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); |
