summaryrefslogtreecommitdiff
path: root/lib9p/tests/test_server/fs_slowread.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-15 15:58:31 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-15 15:58:31 -0600
commitdb9a58f48c6eae16fbfcd89d59b09e123dbed54f (patch)
tree8e20dd9bc3ddf7b766714a57a9d33259c0b91165 /lib9p/tests/test_server/fs_slowread.c
parent03f29736acfcfaee6f263fd1461f96ccae3696da (diff)
libmisc: Add alloc.h to help detect wrong alloc sizes
Lo and behold, there was a mistake in chan.c.
Diffstat (limited to 'lib9p/tests/test_server/fs_slowread.c')
-rw-r--r--lib9p/tests/test_server/fs_slowread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib9p/tests/test_server/fs_slowread.c b/lib9p/tests/test_server/fs_slowread.c
index c94fba0..4567fef 100644
--- a/lib9p/tests/test_server/fs_slowread.c
+++ b/lib9p/tests/test_server/fs_slowread.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <stdlib.h>
+#include <libmisc/alloc.h>
#include "fs_slowread.h"
@@ -68,7 +68,7 @@ static lo_interface lib9p_srv_fio slowread_file_fopen(struct slowread_file *self
assert(self);
assert(ctx);
- struct slowread_fio *ret = malloc(sizeof(struct slowread_fio));
+ struct slowread_fio *ret = heap_alloc(1, struct slowread_fio);
ret->parent = self;
return lo_box_slowread_fio_as_lib9p_srv_fio(ret);